[Python-ideas] Boolean ABC similar to what's provided in the 'numbers' module

Nick Coghlan ncoghlan at gmail.com
Mon Feb 19 23:08:41 EST 2018


On 20 February 2018 at 08:33, Guido van Rossum <guido at python.org> wrote:
> Hm, perhaps Integral is an adjective, just like Boolean? Though it's also
> possible that it was simply a mistake. In general I don't like adding
> aliases for different spellings -- it violates TOOWTDI. If we decide that
> this really was a mistake we should go ahead and make Integer the
> recommended way and define Integral as an alias for backwards compatibility.

FWIW, I had to run `dir(numbers)` while tinkering at the REPL based on
this discussion, because I was surprised that "numbers.Integer" was
giving me an attribute error.

Checking PEP 3141 doesn't shed any light on the question either -
while that cites Scheme as the origin of the numeric tower structure,
the given reference at
https://groups.csail.mit.edu/mac/ftpdir/scheme-reports/r5rs-html/r5rs_8.html#SEC50
uses "integer" rather than "integral".

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-ideas mailing list