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/2013-July/127309.html below:

[Python-Dev] Doubt about closure/function generation in bytecode

[Python-Dev] Doubt about closure/function generation in bytecode [Python-Dev] Doubt about closure/function generation in bytecodeBenjamin Peterson benjamin at python.org
Mon Jul 15 08:06:28 CEST 2013
2013/7/12 Andrea Griffini <agriff at tin.it>:
> Is there any semantic difference between
>
>     BUILD_TUPLE 0
>     LOAD_CONST <code object ... >
>     MAKE_CLOSURE 0
>
> and
>
>     LOAD_CONST <code object ...>
>     MAKE_FUNCTION 0
>
> ?
>
> In other words is there any difference between a function and a closure that
> doesn't capture anything? Is it just a speed optimization for a common case?

It probably has more to do with the fact that nested scopes with added
much later in Python's history than functions.
>



--
Regards,
Benjamin
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