[docs] [issue33235] Better help text for dict.setdefault

Éric Araujo report at bugs.python.org
Fri Apr 6 12:33:18 EDT 2018


Éric Araujo <merwok at netwok.org> added the comment:

Note that if we switch the order like you propose, we don’t need to use dict.get:


  set D[k]=d if k not in D then return D[k]


I suspect the current doc was written the way it is because it matches the actual implementation.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33235>
_______________________________________


More information about the docs mailing list