Terry Reedy wrote:
> This has now been incorporated in the dict.get method so one can
> instead write
>> x = mydict.get(key, defaultvalue)
But the exception form is still useful if evaluating
defaultvalue is expensive and you only want to do it
if you really need it.
--
Greg Ewing, Computer Science Dept,
University of Canterbury,
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg