R. David Murray <rdmur...@bitdance.com> added the comment:

Thanks for the suggestion. 

It is an interesting idea, but there are some issues.  attrgetter and 
itemgetter can take more than one key.  It would probably make more sense to 
have the returned function be the one that takes the default, but in that case 
you might as well just use getattr.  If we did accept a keyword-only argument 
for a default, what does the default mean if there is more than one key?  And 
what if there are dotted names in the attrgetter keys?

I'm inclined to reject this as too complex for a marginal a use case.  But 
perhaps a python-ideas discussion would be appropriate.

----------
nosy: +r.david.murray
type:  -> enhancement
versions:  -Python 3.4

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14384>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to