The Python community has a 5 year plan to push the limit of speed in Python. 
One of the things that reduces Python execution speed is calling methods or 
functions that are not in the nearest scope.

My suggestion is to introduce inline functions just as they are in C. They can 
be defined as global functions or class methods but are created in the scope of 
the function that is calling it at parsetime. I also don’t think it’ll be hard 
to adapt. inline functions might look something like:

inline def func():
pass

inline async def func():
pass

inline class Executor:
inline def func():
pass

For an inline method, the class must be defined as inline as well, in order to 
bring to scope whatever class variable or method that the inline function might 
rely on.

This is just a suggestion, what do you guys think about it.
_______________________________________________
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/7XSAC2STMEU6WJSLP3DGOGJJGG4IUO3L/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to