]> granicus.if.org Git - python/commit
Change simple instances (in Fraction) of self.numerator and self.denominator to
authorJeffrey Yasskin <jyasskin@gmail.com>
Thu, 14 Feb 2008 07:49:25 +0000 (07:49 +0000)
committerJeffrey Yasskin <jyasskin@gmail.com>
Thu, 14 Feb 2008 07:49:25 +0000 (07:49 +0000)
commit339f5e3ffc4d1005020ffc2fc85fcc618c7461fa
tree8b8b870c2217513f3209fe6ad202a034b9ae4726
parent1c214d6c942df3fc7af548f7c7e10961dcaba3ee
Change simple instances (in Fraction) of self.numerator and self.denominator to
self._numerator and self._denominator. This speeds abs() up from 12.2us to
10.8us and trunc() from 2.07us to 1.11us. This doesn't change _add and friends
because they're more complicated.
Lib/fractions.py