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 __slots__ (or I'd have known that just
defining it on Fraction wouldn't work :-/) but if it doesn't prevent
subclasses from having dicts, it seems like a good idea to add an empty
__slots__ to most classes in the ABC hierarchy, and definitely the
numeric ones.

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue4998>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to