[Python-Dev] defaultdict and on_missing() (original) (raw)
Alex Martelli aleaxit at gmail.com
Fri Feb 24 17:47:45 CET 2006
- Previous message: [Python-Dev] defaultdict and on_missing()
- Next message: [Python-Dev] defaultdict and on_missing()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-Dev] defaultdict and on_missing()
- Next message: [Python-Dev] defaultdict and on_missing()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]