Larry Hastings added the comment:

FWIW, Martin agreed with me at EuroPython that "nullable int" is the proper 
name.  So does Wikipedia:

    http://en.wikipedia.org/wiki/Nullable_type


As for "repeat_new": like I said, I don't intend to check in this change when 
checking in nullable ints.  (I really just used it because I was doing the work 
on a plane and just didn't feel like finding a different example.)  I'm simply 
not interested in picking a fight about it.

However, this is using the general approach endorsed by Guido:

    https://mail.python.org/pipermail/python-dev/2014-January/131673.html

And indeed, see thread for further specific discussion of repeat_new.


I feel the position of "these have been in Python for years, they're fine" 
misses the point.  Builtins never had signatures before.  Now that they can 
have signatures, the design decision of writing builtins with non-Pythonic 
signatures has come home to roost.  How can the signature for 
itertools.repeat() convey that "times" is an optional parameter without it 
having a default value?

I view giving all builtins in Python valid signatures as a worthwhile goal unto 
itself.  So ISTM that allowing "times" to accept None to mean "repeat forever" 
is reasonable: it makes the function more Pythonic, and it means it can have a 
meaningful signature.  But if this goal doesn't interest you, I can see why 
you'd think this was a waste of time.

----------

_______________________________________
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