[issue32133] documentation: numbers module nitpick

New submission from abcdef x@mailinator.com:
Documentation of the numbers module: https://docs.python.org/3/library/numbers.html states "None of the types defined in this module can be instantiated."
This is true for Complex, Real, Rational, Integral but not for Number:
numbers.Number()
<numbers.Number object at 0x7fcccc71f3c0>
numbers.Real()
Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: Can't instantiate abstract class Real...
Since Number doesn't have any abstract methods, the correct fix seems to be changing the documentation. I would try to convey something like this:
"The types defined in this module can be used for subclassing and checking whether a specific class is in the numeric hierarchy; they are not used directly for instantiation. For this, you can use types such as `complex` or `fractions.Fraction`".
---------- assignee: docs@python components: Documentation messages: 306970 nosy: abcdef, docs@python priority: normal severity: normal status: open title: documentation: numbers module nitpick type: enhancement versions: Python 2.7, Python 3.6
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue32133 _______________________________________

Change by Sergey B Kirpichev skirpichev@gmail.com:
---------- nosy: +Sergey.Kirpichev
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue32133 _______________________________________
participants (2)
-
abcdef
-
Sergey B Kirpichev