Eric V. Smith <e...@trueblade.com> added the comment:

.get() is just a regular function call. And like all python functions, all of 
the arguments are evaluated before the function is called. There is no 
mechanism in python to delay the evaluation of a arguments.

You might want to look at collections.defaultdict. You can supply a factory 
function, so that the call is delayed until a missing key is found.

----------
nosy: +eric.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39083>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to