[issue16837] Number ABC can be instantiated

2019-08-10 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue16837] Number ABC can be instantiated

2019-08-10 Thread Guido van Rossum
Guido van Rossum added the comment: Let's not do this. We've survived this long. -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue16837] Number ABC can be instantiated

2019-08-09 Thread Raymond Hettinger
Raymond Hettinger 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. Gui

[issue16837] Number ABC can be instantiated

2019-08-09 Thread Raymond Hettinger
Raymond Hettinger 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 d

[issue16837] Number ABC can be instantiated

2019-08-09 Thread Sanyam Khurana
Sanyam Khurana added the comment: I'm changing the versions to Python 3.8 and 3.9 for this bug. -- versions: +Python 3.8, Python 3.9 -Python 3.4, Python 3.5 ___ Python tracker ___

[issue16837] Number ABC can be instantiated

2019-08-09 Thread Sanyam Khurana
Sanyam Khurana added the comment: Hi Alexander, Can you please address the reviews and turn this patch into a GitHub PR, please? -- nosy: +CuriousLearner ___ Python tracker _

[issue16837] Number ABC can be instantiated

2014-12-04 Thread Berker Peksag
Berker Peksag added the comment: I left a couple of comments on Rietveld. -- nosy: +berker.peksag ___ Python tracker ___ ___ Python-bu

[issue16837] Number ABC can be instantiated

2014-09-27 Thread Claudiu Popa
Claudiu Popa added the comment: I'd say that this should be fixed, it breaks the expectancy imposed by the documentation, so +1 from me. -- nosy: +Claudiu.Popa ___ Python tracker __

[issue16837] Number ABC can be instantiated

2014-09-27 Thread Claudiu Popa
Changes by Claudiu Popa : -- components: +Library (Lib) versions: +Python 3.5 -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list

[issue16837] Number ABC can be instantiated

2013-01-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Attached patch fixes the issue and passes regression tests, so most likely the ability to instantiate Number is not an intentional feature. "pass" should probably be replaced with a meaningful docstring, but I would like to hear from others on whether th

[issue16837] Number ABC can be instantiated

2013-01-01 Thread Alexander Belopolsky
New submission from Alexander Belopolsky: According to the reference manual, "None of the types defined in [numbers] module can be instantiated." However, >>> from numbers import * >>> Number() This can probably be fixed by making Number.__hash__ an abstract method. -- messages: 178