Author tzot
Recipients alex, docs@python, rhettinger, tzot
Date 2010-10-21.06:55:59
SpamBayes Score 7.26639e-05
Marked as misclassified No
Message-id <1287644161.72.0.406199879747.issue10160@psf.upfronthosting.co.za>
In-reply-to
Content
Modules/operator.c grows by ~70 lines, most of it the setup code for ag->attr; also I loop twice over the args of attrgetter_new, choosing fast code that runs once per attrgetter creation than temporary data.

Alex's suggestion to make use of Python-level functions to shorten the code of attrgetter_new could obviously work to decrease the source lines. I don't know how fast I would produce such a version if requested, though.

Whatever the way attrgetter_new sets up the data, I would suggest that you keep the logic changes in general, i.e. set-up in attrgetter_new and keep a thinner dotted_getattr , since it avoids running the same checks and splitting over and over again for every attrgetter_call invocation.
History
Date User Action Args
2010-10-21 06:56:01tzotsetrecipients: + tzot, rhettinger, alex, docs@python
2010-10-21 06:56:01tzotsetmessageid: <1287644161.72.0.406199879747.issue10160@psf.upfronthosting.co.za>
2010-10-21 06:56:00tzotlinkissue10160 messages
2010-10-21 06:55:59tzotcreate