Raymond Hettinger added the comment:

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

----------
nosy: +rhettinger

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20341>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to