[Python-3000] A request to keep dict.setdefault() in 3.0 (original) (raw)
Raymond Hettinger python at rcn.com
Mon Jul 9 23:29:04 CEST 2007
- Previous message: [Python-3000] A request to keep dict.setdefault() in 3.0
- Next message: [Python-3000] A request to keep dict.setdefault() in 3.0
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
PEP 3100 suggests dict.setdefault() may be removed in Python 3, since it is in principle no longer necessary (due to the new defaultdict type).
I've forgotten. What was the whole point of Python 3.0? Is it to make the language fat with lots of ways to do everything? Guys, this is your ONE chance to slim down the language and pare away anything that is unnecessary or arcane.
The setdefault() method has too many defects to keep around. Why would you want a method that instantiates the default on every call even if not needed.
Let this one die. The dict API already heavily loaded. Thinning it a bit would be a nice improvement.
Raymond
- Previous message: [Python-3000] A request to keep dict.setdefault() in 3.0
- Next message: [Python-3000] A request to keep dict.setdefault() in 3.0
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]