Preferred Python idiom for handling non-existing dictionary keys and why?

Dave Benjamin ramen at lackingtalent.com
Sat Oct 11 00:55:09 EDT 2003


In article <mailman.9.1065842752.2192.python-list at python.org>, Tim Peters wrote:
> TOOWTDI is a strong force against adding aliases.  The trick is to get Guido
> to think this renaming is so important as to justify using his time machine
> so that the name was always getorset().

I would strongly caution against doing that. I have a time machine too, and
if we both use our time machines at the same time, there is the potential
that Python itself might become aliased. This would be a self-referential
TMTOWTDI, and since by definition Python is not a TMTOWTDI language, it
would become internally inconsistent and, as the late Mr. Adams would say,
"disappear in a puff of logic". We don't want that.

Tread carefully, please.

-- 
.:[ dave benjamin (ramenboy) -:- www.ramenfest.com -:- www.3dex.com ]:.
: d r i n k i n g   l i f e   o u t   o f   t h e   c o n t a i n e r :




More information about the Python-list mailing list