20 Commits (acfdfdafa202b634bc9f9ca5d3aa52e0aeb04e73)

Author SHA1 Message Date
Mark Dickinson fec6620dfb Make Fraction(-1).__hash__() return -2 rather than -1 (see issue 10356). 16 years ago
Mark Dickinson dc787d2055 Issue #8188: Introduce a new scheme for computing hashes of numbers 16 years ago
Mark Dickinson 98127c3716 Merged revisions 79629 via svnmerge from 16 years ago
Mark Dickinson 7c63eee485 Issue #8294: Allow float and Decimal arguments in Fraction constructor. 16 years ago
Mark Dickinson 327f02c60c Merged revisions 79455 via svnmerge from 16 years ago
Mark Dickinson 71b7fac07b Make Fraction to complex comparisons with <=, <, >= or > raise TypeError. 16 years ago
Benjamin Peterson b3be23ad27 remove the svn:executable property from files that don't have shebang lines 16 years ago
Mark Dickinson 41ece0694d Merged revisions 76458 via svnmerge from 17 years ago
Mark Dickinson dfb1562410 Merged revisions 76456 via svnmerge from 17 years ago
Mark Dickinson fb681f701d Merged revisions 76456 via svnmerge from 17 years ago
Mark Dickinson e13dc3e6d5 Issue #7379: Fix incorrect doctest for Fraction.limit_denominator. 17 years ago
Mark Dickinson 88a0a2e47f Issue #6431: Fix Fraction comparisons with unknown types, and with 17 years ago
Mark Dickinson 8d15643a4b Merged revisions 74078 via svnmerge from 17 years ago
Mark Dickinson 85424c9354 Issue #6431: Fix Fraction comparisons to return NotImplemented when 17 years ago
Matthias Klose b0a8be5f1b - remove svn:executable property from some library files 17 years ago
Mark Dickinson d4d95f8eac Merged revisions 71832 via svnmerge from 17 years ago
Mark Dickinson 4af8e745c4 Issue #5812: The two-argument form of the Fraction constructor 17 years ago
Mark Dickinson 8100bd8431 Issue #5812: make Fraction('1e-6') valid. Backport of r71806. 17 years ago
Mark Dickinson cf63f2fb88 Issue #5812: Make Fraction('1e6') valid. The Fraction constructor now 17 years ago
Georg Brandl 3a9b062f5b Manually merge r68096,68189 from 3.0 branch. 18 years ago
Georg Brandl fe427895b5 Manually merge r68095,68186,68187,68188,68190 from 2.6 branch. 18 years ago
Raymond Hettinger 40188782dd Fractions.from_float() no longer loses precision with large integer inputs. 18 years ago
Georg Brandl 2ee470f7f9 Merged revisions 64722,64729,64753,64845-64846,64849,64871,64880-64882,64885,64888,64897,64900-64901,64915,64926-64929,64938-64941,64944,64961,64966,64973 via svnmerge from 18 years ago
Georg Brandl 86b2fb9d77 Merged revisions 64623,64640,64665,64687,64689-64690,64719,64721,64735,64742,64744-64746,64756-64761,64767-64769,64771-64772,64774-64775,64788,64793,64835-64836 via svnmerge from 18 years ago
Raymond Hettinger b01713e7dc Issue 3285: Fractions from_float() and from_decimal() accept Integral arguments. 18 years ago
Raymond Hettinger 548db58e02 Use operator.index() instead of n.__index__(). 18 years ago
Raymond Hettinger 655d583a49 Issue 3287: Raise correct exception for float inputs. 18 years ago
Benjamin Peterson 4118174315 Merged revisions 64475,64544-64545,64550,64557-64558,64565,64570,64577,64582-64583,64585,64590,64592-64593,64625,64630,64638,64647,64655-64656,64663-64664 via svnmerge from 18 years ago
Benjamin Peterson dcf97b98ec Merged revisions 64434-64435,64440-64443,64445,64447-64448,64450,64452,64455,64461,64464,64466,64468 via svnmerge from 18 years ago
Mark Dickinson 3af386a5cb Remove trailing 'L's from numerator and denominator in the 18 years ago
Andrew M. Kuchling f484363bae Use repr() for bad input strings; this makes the empty string or binary characters more visible 18 years ago
Raymond Hettinger e580f5c55a Forward port r62849. 18 years ago
Raymond Hettinger cf98f03a62 The __all__ variable forgot to expose the gcd() function. 18 years ago
Christian Heimes 68f5fbe944 Merged revisions 60481,60485,60489-60492,60494-60496,60498-60499,60501-60503,60505-60506,60508-60509,60523-60524,60532,60543,60545,60547-60548,60552,60554,60556-60559,60561-60562,60569,60571-60572,60574,60576-60583,60585-60586,60589,60591,60594-60595,60597-60598,60600-60601,60606-60612,60615,60617,60619-60621,60623-60625,60627-60629,60631,60633,60635,60647,60650,60652,60654,60656,60658-60659,60664-60666,60668-60670,60672,60676,60678,60680-60683,60685-60686,60688,60690,60692-60694,60697-60700,60705-60706,60708,60711,60714,60720,60724-60730,60732,60736,60742,60744,60746,60748,60750-60766,60769-60786 via svnmerge from 19 years ago
Jeffrey Yasskin 339f5e3ffc Change simple instances (in Fraction) of self.numerator and self.denominator to 19 years ago
Jeffrey Yasskin 1c214d6c94 Performance optimizations on Fraction's constructor. 19 years ago
Mark Dickinson 0aa52a1658 Revert change in r60712: turn alternate constructors back into 19 years ago
Mark Dickinson e1b824793a Implementation of Fraction.limit_denominator. 19 years ago
Christian Heimes 3feef61742 Merged revisions 60481,60485,60489-60492,60494-60496,60498-60499,60501-60503,60505-60506,60508-60509,60523-60524,60532,60543,60545,60547-60548,60552,60554,60556-60559,60561-60562,60569,60571-60572,60574,60576-60583,60585-60586,60589,60591,60594-60595,60597-60598,60600-60601,60606-60612,60615,60617,60619-60621,60623-60625,60627-60629,60631,60633,60635,60647,60650,60652,60654,60656,60658-60659,60664-60666,60668-60670,60672,60676,60678,60680-60683,60685-60686,60688,60690,60692-60694,60697-60706,60708-60712,60714-60724 via svnmerge from 19 years ago
Mark Dickinson d058cd2cc8 Rename rational.Rational to fractions.Fraction, to avoid name clash 19 years ago
Mark Dickinson 74d0914413 Turn classmethods into staticmethods, and avoid calling the constructor 19 years ago
Christian Heimes 15ebc88d87 Merged revisions 60481,60485,60489-60492,60494-60496,60498-60499,60501-60503,60505-60506,60508-60509,60523-60524,60532,60543,60545,60547-60548,60552-60567 via svnmerge from 19 years ago
Jeffrey Yasskin a26cf9b760 Make int() and long() fall back to __trunc__(). See issue 2002. 19 years ago
Christian Heimes 292d351fc1 Merged revisions 60481,60485,60489-60520,60523-60527,60530-60533,60535-60538,60540-60551 via svnmerge from 19 years ago
Mark Dickinson 1dabdb25f8 Make the Rational constructor accept '3.' and '.2' as well as '3.2'. 19 years ago
Christian Heimes 400adb030a Merged revisions 60475-60479,60481-60488 via svnmerge from 19 years ago
Jeffrey Yasskin dc2964b0d8 Roll back r60248. It's useful to encourage users not to change Rational 19 years ago
Raymond Hettinger 2df20a3e08 Minor wordsmithing on docstring 19 years ago
Jeffrey Yasskin 38db364076 Remove unused to-be-magic methods from Rational per issue 1968. Do not port 19 years ago
Christian Heimes 7b3ce6a17e Merged revisions 60441-60474 via svnmerge from 19 years ago