[Python-Dev] defaultdict and on_missing() (original) (raw)
Thomas Wouters thomas at xs4all.net
Thu Feb 23 22:45:19 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 Wed, Feb 22, 2006 at 01:13:28PM -0800, Michael Chermside wrote:
Haven't we learned from regrets over the .next() method of iterators that all "magically" invoked methods should be named using the xxx pattern? Shouldn't it be named onmissing() instead?
I agree that on_missing should be missing (or missing_key) but I don't agree on the claim that all 'magically' invoked methods should be two-way-double-underscored. methods are methods that should only be called 'magically', or by the object itself. 'next' has quite a few usecases where it's desireable to call it directly (and I often do.)
-- Thomas Wouters <thomas at xs4all.net>
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
- Previous message: [Python-Dev] defaultdict and on_missing()
- Next message: [Python-Dev] defaultdict and on_missing()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]