user
a year ago
[deleted]
Item id: 41834008
a year ago
a year ago
a year ago
> ''' if exists is False , will not overwrite current key if it's alreay there '''
...That's what `setdefault` does. It just also returns the value, which you're free to ignore. (The other version is what ordinary key assignment does.)
Also, that's really not a clear name for the parameter at all.