On Sat, 2 Sep 2017 10:38:05 -0700 Chris Barker <[email protected]> wrote: > On Fri, Sep 1, 2017 at 6:16 PM, Joe Jevnik via Python-Dev < > [email protected]> 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 [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
