[issue10160] operator.attrgetter slower than lambda after adding dotted names ability

Χρήστος Γεωργίου (Christos Georgiou) report at bugs.python.org
Sat Oct 30 23:31:08 CEST 2010


Χρήστος Γεωργίου (Christos Georgiou) <tzot at users.sourceforge.net> added the comment:

Thank you very much, Antoine, for your review. My comments in reply:

- the dead code: it's not dead, IIRC it ensures that at least one argument is given, otherwise it raises an exception.

- PyUnicode_GET_SIZE: you're right. The previous patch didn't have this problem, because there were two loops: the first one made sure in advance that all arguments are PyUnicode.

- the false comment: right again. A remain from the first patch.

- dotted_getattr and references: right! I should have noted better what Raymond's initial loop did.

Attached a corrected version of the patch according to Antoine's comments.

----------
Added file: http://bugs.python.org/file19440/issue10160.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10160>
_______________________________________


More information about the Python-bugs-list mailing list