Tino Lange a ?crit :
I just realized that <dict>.setdefault *always* executes the second
argument - even if it's not necessary, because the requested item in
the first argument exists.
I just realized that <dict>.setdefault *always* executes the second
argument - even if it's not necessary, because the requested item in
the first argument exists.
behaviour: method and function arguments are always evaluated before the
method is called.
--
Alexandre Fayolle
LOGILAB, Paris (France).
http://www.logilab.com http://www.logilab.fr http://www.logilab.org
D?veloppement logiciel avanc? - Intelligence Artificielle - Formations