On Sat, 2 Sep 2017 10:38:05 -0700 Chris Barker <chris.bar...@noaa.gov> wrote: > On Fri, Sep 1, 2017 at 6:16 PM, Joe Jevnik via Python-Dev < > python-dev@python.org> wrote: > > > The string concat optimization happens in the interpreter dispatch for > > INPLACE_ADD > > > > In that case, isn't there a new string being build, all in one line of > python? that is, the string the optimization is being created at that > point, so the interpreter can know there isn't anything referencing it > anywhere else.
You can go to the source and check yourself: https://github.com/python/cpython/blob/master/Python/ceval.c#L5226-L5277 Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com