Message349331
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. |
|
Date |
User |
Action |
Args |
2019-08-10 05:48:38 | rhettinger | set | recipients:
+ rhettinger, gvanrossum, ncoghlan, belopolsky, eric.araujo, Claudiu.Popa, berker.peksag, CuriousLearner |
2019-08-10 05:48:38 | rhettinger | set | messageid: <1565416118.93.0.985319459824.issue16837@roundup.psfhosted.org> |
2019-08-10 05:48:38 | rhettinger | link | issue16837 messages |
2019-08-10 05:48:38 | rhettinger | create | |
|