This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients David MacIver, Kevin Shweh, Tijs Van Oevelen, abarry, arigo, donmez, ezio.melotti, fijall, ncoghlan, r.david.murray, rhettinger, serhiy.storchaka, torsten
Date 2015-12-14.15:28:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
[Emanuel Barry]
> In which circumstances does comparing two code objects
> (at function creation time, what's more) make any sense?

It makes closures efficient:

    >>> def f(x):
            def g(y):
                    return x + y
            return g

    >>> h = f(1)
    >>> i = f(2)
    >>> h.__code__ is i.__code__
Date User Action Args
2015-12-14 15:28:03rhettingersetrecipients: + rhettinger, arigo, ncoghlan, donmez, ezio.melotti, r.david.murray, torsten, fijall, serhiy.storchaka, David MacIver, abarry, Kevin Shweh, Tijs Van Oevelen
2015-12-14 15:28:03rhettingersetmessageid: <>
2015-12-14 15:28:03rhettingerlinkissue25843 messages
2015-12-14 15:28:03rhettingercreate