[issue16837] Number ABC can be instantiated
Raymond Hettinger
report at bugs.python.org
Fri Aug 9 22:36:54 EDT 2019
Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:
Usually, setting hash to None is the proper way to turn-off hashability. And it's possible that existing code has subclassed Number and provided other methods but not __hash__, so this could potentially break their code. On the other hand, it would be desirable to prevent instantiation, perhaps using some other mechanism would be better. I'll take a deeper look at this when I get a chance.
----------
assignee: -> rhettinger
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue16837>
_______________________________________
More information about the Python-bugs-list
mailing list