Mark Dickinson dicki...@gmail.com added the comment:
This needs to be merged before 3.0.1 goes out. I can't do it right now
since I don't have ssh access; will do it when I get home if no-one
beats me to it.
--
priority: critical - release blocker
Mark Dickinson dicki...@gmail.com added the comment:
Merged (manually) to py3k in r69547; svnmerged to 3.0 and 2.6 in r69548,
r69549.
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4998
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
assignee: jyasskin - marketdickinson
keywords: +patch
priority: release blocker - critical
type: - behavior
versions: +Python 2.6, Python 2.7, Python 3.1
Added file: http://bugs.python.org/file12810/fractions.diff
Mark Dickinson dicki...@gmail.com added the comment:
Thanks for the patch, Raymond.
I'm don't really have any experience with ABCs. I've read the PEP (a few
times), but am not convinced that I fully understand all the ideas
involved.
What are the practical differences between having
Jeffrey Yasskin jyass...@gmail.com added the comment:
Rational has default definitions for some of its methods and properties.
If Fraction inherits from Rational, it gets those definitions
implicitly. If it's registered with Rational, it has to define them itself.
I don't know that much about
Mark Dickinson dicki...@gmail.com added the comment:
Got it. Thanks, Jeffrey. The patch looks good to me---please go ahead
and apply.
--
assignee: marketdickinson - rhettinger
___
Python tracker rep...@bugs.python.org
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Fixed in the trunk: r68813.
Benjamin, can you please apply to 2.6, 3.0 and 3.1.
--
assignee: rhettinger - benjamin.peterson
resolution: - fixed
___
Python tracker
Benjamin Peterson benja...@python.org added the comment:
The problem is that Fraction inherits from a class without __slots__
(Rationale), so it's useless. I suggest that the __slots__ be removed or
Rationale.register() is used instead of inheritance.
--
assignee: - jyasskin
nosy:
Mark Dickinson dicki...@gmail.com added the comment:
I believe that __slots__ was used for performance (memory, speed) reasons
here rather than for preventing random attribute assignments. But maybe
inheriting from Rational invalidates those reasons as well...
--
nosy:
Mark Dickinson dicki...@gmail.com added the comment:
The Decimal class has the same issue in py3k (but not in the trunk).
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4998
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Arghh! Decimal is NOT supposed to inherit or register with numbers.
Guido has pronounced on this and we've discussed it multiple times. See
the comments in numbers.py which were supposed to serve as a reminder.
Decimals
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Fixed the decimal issue in r68800 and r68799 .
Still needs a fix to Fractions, preferably adding an empty __slots__ to
all levels of numbers.py.
___
Python tracker rep...@bugs.python.org
12 matches
Mail list logo