[docs] Bug Report: Incorrect Abstract Method Requirements in numbers.Integral Documentation

Georg Brandl georg at python.org
Sun Apr 14 11:59:46 CEST 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 07.02.2012 20:11, schrieb Lefavor, Matthew (GSFC-582.0)[MICROTEL LLC]:
> To whom it may concern:
> 
> The documentation for numbers.Integral reports incorrect abstract method 
> requirements for numbers.Integral.
> 
> The documentation for numbers.Integral (in both Python 2.7 and Python 3.2)
> states:
> 
> Subtypes Rational 
> <http://docs.python.org/library/numbers.html#numbers.Rational> and adds a 
> conversion to int <http://docs.python.org/library/functions.html#int>.
> Provides defaults for float() 
> <http://docs.python.org/library/functions.html#float>, numerator 
> <http://docs.python.org/library/numbers.html#numbers.Rational.numerator>, 
> and denominator 
> <http://docs.python.org/library/numbers.html#numbers.Rational.denominator>,
> and bit-string operations: <<, >>, &, ^, |, ~.
> 
> Defaults for operations <<, >>, &, ^, |, and ~ are not provided, and a look
> at the source code shows that they are all given as abstract methods. In
> addition, in Python 2.x, numbers.Integral adds an abstract conversion to
> long. This is not recorded in the documentation.
> 
> Originally, I was going to report this as a bug, because PEP 3141 
> <http://www.python.org/dev/peps/pep-3141/> (the PEP that specifies the
> numbers module) goes so far as to include the <<, >>, &, ^, |, and ~ in the
> source code for numbers.Integral. It looks like somebody already had
> reported this years ago, however, to python-dev with Issue 3056
> <http://bugs.python.org/issue3056>. The issue was never resolved, but has
> since been closed.
> 
> Since the development community does not seem interested in adding these 
> features, the features should be removed from documentation.

Hi Matthew,

thanks for your report, this is now fixed (belatedly) and should appear online
soon.

cheers,
Georg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iEYEARECAAYFAlFqfhIACgkQN9GcIYhpnLDqWACgicAscvinCw1kDYMo4dVUD08R
+KsAnR8ac+gQ5WU9jnZ08JbtT3EnYBad
=IcjV
-----END PGP SIGNATURE-----


More information about the docs mailing list