Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
python
/
cpython2
/
b01713e7dc26721e821a2b3ed8a67600d68940fb
/
Lib
/
fractions.py
b01713e
Issue 3285: Fractions from_float() and from_decimal() accept Integral arguments.
by Raymond Hettinger
· 16 years ago
548db58
Use operator.index() instead of n.__index__().
by Raymond Hettinger
· 16 years ago
655d583
Issue 3287: Raise correct exception for float inputs.
by Raymond Hettinger
· 16 years ago
3af386a
Remove trailing 'L's from numerator and denominator in the
by Mark Dickinson
· 16 years ago
f484363
Use repr() for bad input strings; this makes the empty string or binary characters more visible
by Andrew M. Kuchling
· 16 years ago
cf98f03
The __all__ variable forgot to expose the gcd() function.
by Raymond Hettinger
· 16 years ago
339f5e3
Change simple instances (in Fraction) of self.numerator and self.denominator to
by Jeffrey Yasskin
· 17 years ago
1c214d6
Performance optimizations on Fraction's constructor.
by Jeffrey Yasskin
· 17 years ago
0aa52a1
Revert change in r60712: turn alternate constructors back into
by Mark Dickinson
· 17 years ago
e1b8247
Implementation of Fraction.limit_denominator.
by Mark Dickinson
· 17 years ago
cd873fc
Put an extra space into the repr of a Fraction:
by Mark Dickinson
· 17 years ago
d058cd2
Rename rational.Rational to fractions.Fraction, to avoid name clash
by Mark Dickinson
· 17 years ago
[Renamed (81%) from Lib/rational.py]
74d0914
Turn classmethods into staticmethods, and avoid calling the constructor
by Mark Dickinson
· 17 years ago
a26cf9b
Make int() and long() fall back to __trunc__(). See issue 2002.
by Jeffrey Yasskin
· 17 years ago
1dabdb2
Make the Rational constructor accept '3.' and '.2' as well as '3.2'.
by Mark Dickinson
· 17 years ago
dc2964b
Roll back r60248. It's useful to encourage users not to change Rational
by Jeffrey Yasskin
· 17 years ago
2df20a3
Minor wordsmithing on docstring
by Raymond Hettinger
· 17 years ago
38db364
Remove unused to-be-magic methods from Rational per issue 1968. Do not port
by Jeffrey Yasskin
· 17 years ago
b23dea6
Added more documentation on how mixed-mode arithmetic should be implemented. I
by Jeffrey Yasskin
· 17 years ago
3ea7b41
Moved Rational._binary_float_to_ratio() to float.as_integer_ratio() because
by Jeffrey Yasskin
· 17 years ago
63c77b6
Docstring nit
by Raymond Hettinger
· 17 years ago
3e1a373
Make rational.gcd() public and allow Rational to take decimal strings, per
by Jeffrey Yasskin
· 17 years ago
9ec7bc3
More design notes
by Raymond Hettinger
· 17 years ago
9c6d81f
Fix-up signature for approximation.
by Raymond Hettinger
· 17 years ago
7ea8225
Add one other review comment.
by Raymond Hettinger
· 17 years ago
921cb5d
Mark todos and review comments.
by Raymond Hettinger
· 17 years ago
a621674
Add support for copy, deepcopy, and pickle.
by Raymond Hettinger
· 17 years ago
909e334
More code cleanup. Remove unnecessary indirection to useless class methods.
by Raymond Hettinger
· 17 years ago
5b0e27e
Add support for int(r) just like the other numeric classes.
by Raymond Hettinger
· 17 years ago
7a6eacd
Clean-up and speed-up code by accessing numerator/denominator directly. There's no reason to enforce readonliness
by Raymond Hettinger
· 17 years ago
f336c8b
Cleanup
by Raymond Hettinger
· 17 years ago
eb46190
Minor clean-up and more tests.
by Raymond Hettinger
· 17 years ago
cf10926
Add first-cut at an approximation function (still needs rounding tweaks). Add continued fraction conversions.
by Raymond Hettinger
· 17 years ago
45169fb
Several tweaks: add construction from strings and .from_decimal(), change
by Jeffrey Yasskin
· 17 years ago
d7b0033
Add rational.Rational as an implementation of numbers.Rational with infinite
by Jeffrey Yasskin
· 17 years ago