[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 ;-) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com