[issue10533] Need example of using __missing__

2011-01-08 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: See r87858. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10533 ___

[issue10533] Need example of using __missing__

2011-01-08 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Great, thanks. We’ll see later if more cross-links are needed. -- stage: needs patch - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10533

[issue10533] Need example of using __missing__

2010-11-25 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: 4. I cannot come up with another typical integer value that would be useful, then again I've used , [] and set() numerous times. You can get '' with str as default factory and [] with list. I think we agree on reclassifying this as a doc

[issue10533] Need example of using __missing__

2010-11-25 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Well, I was perfectly aware of __missing__ - it's just a three liner to do it when using a lambda isn't *that* bad... I'm sure the documentation could be improved to highlight __missing__ though. It's almost always the case that

[issue10533] Need example of using __missing__

2010-11-25 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: [Łukasz Langa] __missing__ didn't appear to be the one obvious way to anyone. Two thoughts: * There is part of the Zen that says that way may not be obvious unless your Dutch. In this case, __missing__ was the API