[issue46148] Optimize pathlib

Guido van Rossum report at bugs.python.org
Wed Dec 22 20:48:03 EST 2021


Guido van Rossum <guido at python.org> added the comment:

> Note: attrgetter could easily be made faster by migrating it to use vectorcall.

Sure, though code that *doesn't* use attrgetter is usually easier to read -- attrgetter is rare enough in my experience that I usually have to look it up. So making attrgetter unnecessary in most cases would also be welcome.

(The exception is when you have many trivial pass-through properties, or when the attribute name is a variable to begin with.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46148>
_______________________________________


More information about the Python-bugs-list mailing list