[Python-ideas] `numbers.Natural`

Thomas Gläßle t_glaessle at gmx.de
Fri Sep 26 20:10:11 CEST 2014


At first glance it sounds nice and straight forward.
But - is a natural positive, or just non-negative? I guess, I'd have to
look it up in the docs each time, since either definition is used in
lots of places.
Also, Natural does not correspond to the python type, but its value. So,
you couldn't use it with issubclass.


Ram Rachum wrote on 09/26/2014 07:54 PM:
> I wish the `numbers` module would include a `Natural` class that would
> simply check whether the number is integral and positive.
>
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140926/267d6a21/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140926/267d6a21/attachment.sig>


More information about the Python-ideas mailing list