Opened 13 years ago
Closed 13 years ago
#837 closed enhancement (fixed)
[with patch] RealNumber should have abs method
Reported by: | dmharvey | Owned by: | cwitty |
---|---|---|---|
Priority: | major | Milestone: | sage-2.8.9 |
Component: | basic arithmetic | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | Work issues: | ||
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
This violates the principle of least surprise, at least for me:
sage: x = -2.0 sage: x.abs() --------------------------------------------------------------------------- <type 'exceptions.AttributeError'> Traceback (most recent call last) /Users/david/sage-2.8.5/<ipython console> in <module>() <type 'exceptions.AttributeError'>: 'sage.rings.real_mpfr.RealNumber' object has no attribute 'abs'
Attachments (1)
Change History (6)
comment:1 Changed 13 years ago by
- Milestone set to sage-2.9
comment:2 Changed 13 years ago by
- Owner changed from somebody to cwitty
Changed 13 years ago by
comment:3 Changed 13 years ago by
- Milestone changed from sage-2.9 to sage-2.8.8
- Summary changed from RealNumber should have abs method to [with patch] RealNumber should have abs method
comment:4 Changed 13 years ago by
- Milestone changed from sage-2.8.8 to sage-2.8.9
comment:5 Changed 13 years ago by
- Resolution set to fixed
- Status changed from new to closed
applied to 2.8.9.alpha0
Note: See
TracTickets for help on using
tickets.
The attached patch actually adds an abs() method to every RingElement? (that just forwards to the
__abs__
method).