On 2/24/06, Raymond Hettinger <python at rcn.com> wrote: > > Michael Chermside wrote: > >> The next() method of iterators was an interesting > >> object lesson. ... Since it was sometimes invoked by name > >> and sometimes by special mechanism, the choice was to use the > >> unadorned name, but later experience showed that it would have been > >> better the other way. > > [Grep] > > Any thoughts about fixing this in 3.0? > > IMO, it isn't broken. It was an intentional divergence from naming conventions. > The reasons for the divergence haven't changed. Code that uses next() is more > understandable, friendly, and readable without the walls of underscores. Wouldn't, say, next(foo) [[with a hypothetical builtin 'next' internally calling foo.__next__(), just like builtin 'len' internally calls foo.__len__()]] be just as friendly etc? No biggie either way, but that would seem to be more aligned with Python's usual approach. Alex
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