Greg Ewing wrote: > Guido van Rossum wrote: > >> I personally like having 'iter' in the name (e.g. iterkeys() -- note >> that we dropped this in Py3k because it's no longer an iterator, it's >> a dict view now. But I don't want to promote that style for ipaddr.py. > > +1 from me too on having all methods that return iterators > clearly indicating so. It's an important distinction, and > it can be very confusing if some methods of an API return > iterators and others don't with no easy way of remembering > which is which. With the prevalence of iterators in Python 3 [1], the easy way is to have the API default to iterators, drop 'iter' from the names, and use 'list' in the names to signal the oddball cases where a list is returned instead. ~Ethan~ [1] http://mail.python.org/pipermail/python-dev/2012-March/117815.html
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4