A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-August/055863.html below:

[Python-Dev] setdefault's second argument

[Python-Dev] setdefault's second argument [Python-Dev] setdefault's second argumentTim Peters tim.peters at gmail.com
Tue Aug 30 22:27:44 CEST 2005
[Fredrik Lundh]
> ...
> Anyone remember why nobody managed to come up with a better name
> for setdefault (which is probably the worst name ever given to a method
> in the standard Python distribution) ?

I suggested a perfect name at the time:

    http://mail.python.org/pipermail/python-dev/2000-August/008036.html

To save you from following that link, to this day I still mentally
translate "setdefault" to "getorset" whenever I see it.  That it
didn't get that name is probably Skip's fault, for whining that
"getorsetandget" would be "more accurate" <wink>.  Actually, there's
no evidence that Guido noticed:

    http://mail.python.org/pipermail/python-dev/2000-August/008059.html

> (if I were in charge, I'd rename it to something more informative.  I'd also
> add a "join" built-in (similar to the good old string.join) and a "textfile"
> built-in (similar to open("U") plus support for encodings).  but that's me.  I
> want my code nice and tidy.)

I'm not sure who is in charge, but I am sure they can be bribed ;-)
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4