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 da-dada
Recipients da-dada, eric.smith, remi.lapeyre
Date 2019-12-08.21:47:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1575841625.12.0.864811549742.issue38998@roundup.psfhosted.org>
In-reply-to
Content
I have no problem of making my programme run properly (asking first if in dict etc), but I just read the docu of dict.setdefault

setdefault(key[, default]) 
If key is in the dictionary, return its value. If not, insert key with a value of default and return default. default defaults to None.

and it clearly reads if the key is.. return its value, with a full stop;
so either the docu is wrong (but proposes exactly the needed shortcut) or python is as it is: come in & find out
History
Date User Action Args
2019-12-08 21:47:05da-dadasetrecipients: + da-dada, eric.smith, remi.lapeyre
2019-12-08 21:47:05da-dadasetmessageid: <1575841625.12.0.864811549742.issue38998@roundup.psfhosted.org>
2019-12-08 21:47:05da-dadalinkissue38998 messages
2019-12-08 21:47:04da-dadacreate