Eric V. Smith 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.
New submission from Martin Meo :
"""
Unexpected behavior report
Dictionary get(key, default-expression) not short circuit behavior
MacOS 10.14.6
sys.version_info(major=3, minor=6, micro=5, releaselevel='final', serial=0)
BACKGROUND
A python dictionary is a data structure that associates a set