Message 156533 - Python tracker

Message156533

Author r.david.murray
Recipients r.david.murray, tebeka
Date 2012-03-22.01:35:27
SpamBayes Score 0.00015915876
Marked as misclassified No
Message-id <1332380133.17.0.890140886822.issue14384@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-03-22 01:35:33r.david.murraysetrecipients: + r.david.murray, tebeka
2012-03-22 01:35:33r.david.murraysetmessageid: <1332380133.17.0.890140886822.issue14384@psf.upfronthosting.co.za>
2012-03-22 01:35:32r.david.murraylinkissue14384 messages
2012-03-22 01:35:28r.david.murraycreate