Message256381
[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__
True |
|
Date |
User |
Action |
Args |
2015-12-14 15:28:03 | rhettinger | set | recipients:
+ 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:03 | rhettinger | set | messageid: <1450106883.34.0.0978889870607.issue25843@psf.upfronthosting.co.za> |
2015-12-14 15:28:03 | rhettinger | link | issue25843 messages |
2015-12-14 15:28:03 | rhettinger | create | |
|