This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients Claudiu.Popa, CuriousLearner, belopolsky, berker.peksag, eric.araujo, gvanrossum, ncoghlan, rhettinger
Date 2019-08-10.05:48:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1565416118.93.0.985319459824.issue16837@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-08-10 05:48:38rhettingersetrecipients: + rhettinger, gvanrossum, ncoghlan, belopolsky, eric.araujo, Claudiu.Popa, berker.peksag, CuriousLearner
2019-08-10 05:48:38rhettingersetmessageid: <1565416118.93.0.985319459824.issue16837@roundup.psfhosted.org>
2019-08-10 05:48:38rhettingerlinkissue16837 messages
2019-08-10 05:48:38rhettingercreate