
Nov. 30, 2003
9:54 p.m.
I concur: "overloading" extract to mean (the equivalent of) either getattr or getitem depending on the argument type doesn't look good, besides making it unusable to extract some items from dicts.
Agreed. I've seen too many of such "clever" overloading schemes in a past life.
Since these functions or types are going to be in operator, I think we can afford to "spend" two names to distinguish functionality (even though attgetter and itemgetter look nowhere as neat as extract -- I don't have better suggestions offhand).
Right. --Guido van Rossum (home page: http://www.python.org/~guido/)