Check for dict key existence, and modify it in one step.
Bruno Desthuilliers
bruno.42.desthuilliers at wtf.websiteburo.oops.com
Wed Aug 29 03:45:03 EDT 2007
rodrigo a écrit :
> You're right of course, I was unclear. I wasn't using 'dict' to
> override the dict clas, but just as a standin for the example (the
> actual dictionary names are varied).
I guessed so, but Python's behaviour wrt/ naming can be somewhat
surprising for newcomers, and accidentally shadowing builtins (or not
builtins FWIW) names is a common pitfall. So better to warn newcomers
lurking here !-)
More information about the Python-list
mailing list