Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

I looked into this a bit more and don't see another non-invasive way of 
blocking instantiation.

Marking for Guido to take a look at.  He's the expert on ABCs and typing and is 
the originator of the __hash__ = None approach to turning off hashability.

Guido, would you like number subclasses to require an override of __hash__ or 
is the accidental instantiation of Number() something we even care about (I 
think this unlikely to ever arise in practice)?  My suggestion is to deem it 
harmless and leave it as is.

----------
assignee: rhettinger -> gvanrossum
nosy: +gvanrossum
versions: +Python 2.7 -Python 3.8, Python 3.9

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

Reply via email to