On Wed, Jun 16, 2021 at 10:24 PM David Mertz <[email protected]> wrote:
> > If you read the BPO the OP linked, that was a suggested patch to optimize >> sum(list_of_lists) -- I'm not sure that's such a bad idea after all. >> > > The proposal was to drop in .__iadd__() for .__add__(), wasn't it? As a > heavy NumPy user, you know those sometimes have different semantics > well, yes, but the numpy example was brought up -- and a patch that addressed that was offered. I think it's clearly possible to optimize certain types -- and maybe all Sequence container types. The question is whether that's a good idea. The fact that it was decided to raise for strings, when an optimization could have been added answers that question. Despite my personal opinion, I think the only options are to raise for more types, with a helpful message, or just leave it alone. -CHB -- Christopher Barker, PhD (Chris) Python Language Consulting - Teaching - Scientific Software Development - Desktop GUI and Web Development - wxPython, numpy, scipy, Cython
_______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/GEAVKQGAHJEJMCIKUACBFO5SU2MIVPG2/ Code of Conduct: http://python.org/psf/codeofconduct/
