Éric Araujo <mer...@netwok.org> added the comment:

The two lines are equivalent!

`d.setdefault(key, default)` does return the same thing as `d.get(key, 
default)`, and then sets `d[key] = default` if the get method went into the 
“key was not found, let’s return default” branch.

----------
nosy: +eric.araujo

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

Reply via email to