[issue10533] Need example of using __missing__

2011-01-08 Thread Éric Araujo
Éric Araujo added the comment: Great, thanks. We’ll see later if more cross-links are needed. -- stage: needs patch -> committed/rejected ___ Python tracker ___ ___

[issue10533] Need example of using __missing__

2011-01-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: See r87858. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bu

[issue10533] Need example of using __missing__

2010-11-25 Thread Raymond Hettinger
Raymond Hettinger 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 designed by Guido to handle the prob

[issue10533] Need example of using __missing__

2010-11-25 Thread Michael Foord
Michael Foord 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 documentation can be improved.

[issue10533] Need example of using __missing__

2010-11-25 Thread Éric Araujo
Éric Araujo 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 problem. Proposal: