> What inlining usually means is to copy the body of the function
> in place of the call, with appropriate parameter substitutions.
> That would eliminate most of the overhead of a function call, but
> there are problems with doing it in Python. Imported modules would
> have to be located and parsed at compile time, something that doesn't
> currently happen. And it can't be done in general-- the location of an
> imported module isn't know for sure until run time, because changes
> can be made dynamically to sys.path.

This is what I was thinking about as well. That's why I tried to limit the 
operations of this feature to compiletime only, 
If a function fails to be inlined at compiletime due to dynamic behavior of 
python, then the normal function call behavior can be the fallback
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/D7YNBPTLFHH4QBXKDSTPV22WGKPBPSYX/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to