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 abcdef
Recipients abcdef, docs@python
Date 2017-11-25.18:31:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Documentation of the numbers module:
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`".
Date User Action Args
2017-11-25 18:31:43abcdefsetrecipients: + abcdef, docs@python
2017-11-25 18:31:43abcdefsetmessageid: <>
2017-11-25 18:31:43abcdeflinkissue32133 messages
2017-11-25 18:31:43abcdefcreate