commit | 5b0e27e50d33f33515f31ff6fec123f5e2be9d73 | [log] [tgz] |
---|---|---|
author | Raymond Hettinger <python@rcn.com> | Thu Jan 24 19:30:19 2008 +0000 |
committer | Raymond Hettinger <python@rcn.com> | Thu Jan 24 19:30:19 2008 +0000 |
tree | 89c7bda9381f616f1cc09c32eaea319b37aa3201 | |
parent | 5ca924038dd196217cedd4b02480ea16acd634f3 [diff] [blame] |
Add support for int(r) just like the other numeric classes.
diff --git a/Lib/rational.py b/Lib/rational.py index 60cd129..6824f4a 100755 --- a/Lib/rational.py +++ b/Lib/rational.py
@@ -376,6 +376,8 @@ else: return a.numerator // a.denominator + __int__ = __trunc__ + def __floor__(a): """Will be math.floor(a) in 3.0.""" return a.numerator // a.denominator