A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2017-September/149138.html below:

[Python-Dev] Inplace operations for PyLong objects

[Python-Dev] Inplace operations for PyLong objects [Python-Dev] Inplace operations for PyLong objectsAntoine Pitrou solipsis at pitrou.net
Sat Sep 2 13:50:39 EDT 2017
On Sat, 2 Sep 2017 10:38:05 -0700
Chris Barker <chris.barker at noaa.gov> wrote:
> On Fri, Sep 1, 2017 at 6:16 PM, Joe Jevnik via Python-Dev <
> python-dev at 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.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4