On Sun, Oct 29, 2017 at 1:05 PM, Soni L. <fakedme...@gmail.com> wrote: > And how do you make the object creation so cheap to the point where it's > actually practical? (quick question: does Python use a single opcode and an > optimized codepath for method calls, or does it always create a method > wrapper, even for immediate o.m() calls? If it's the latter then yeah I > guess there's no reason for new syntax because it's not gonna be > significantly slower than what we currently have...)
Python-the-language simply specifies the semantics. Different implementations do different things. AIUI CPython 3.7 always creates a method wrapper (using a free-list to minimize memory allocations), but a future version might not; and PyPy's current versions have a special opcode. ChrisA _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/