Message 224463 - Python tracker

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.

Content
FWIW, I agree with Antoine that Nullable Int is a misnomer.

Also, I don't buy into this mission to change signatures for optional ints into int-or-none.   In particular, itertools.repeat() is fine as-is.  Optional int APIs have been around for a long time, they work fine, and they really don't need to be changed.  AFAICT, there is no real issue here that warrants changes to existing APIs.


>>> s = [10, 20, 30]
>>> s.pop(None)
Traceback (most recent call last):
  File "<pyshell#5>", line 1, in <module>
    s.pop(None)
TypeError: 'NoneType' object cannot be interpreted as an integer


>>> int('42', None)
Traceback (most recent call last):
  File "<pyshell#7>", line 1, in <module>
    int('42', None)
TypeError: 'NoneType' object cannot be interpreted as an integer