This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.araujo
Recipients Paddy McCarthy, docs@python, eric.araujo
Date 2018-04-06.16:31:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1523032314.25.0.682650639539.issue33235@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2018-04-06 16:31:54eric.araujosetrecipients: + eric.araujo, docs@python, Paddy McCarthy
2018-04-06 16:31:54eric.araujosetmessageid: <1523032314.25.0.682650639539.issue33235@psf.upfronthosting.co.za>
2018-04-06 16:31:54eric.araujolinkissue33235 messages
2018-04-06 16:31:54eric.araujocreate