Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:
Some thoughs: * Lib/sets.py benefitted significantly from itertools and METH_COEXIST. * The dunder methods are part of the public API. Serhiy's persona tastes aside, there is no reason not to use them like any other method. * Given a performance trade-off between classes and subclasses, almost universally we give preference to the parent class. * The folks who use itertools with __getitem__ and __contains__ almost always do so because they care about speed and have a preference for a functional style. Removing the current optimization would directly hit those folks and their style of coding, resulting in code that used to be fast and elegant becoming slow. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34396> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com