Message295761
Thanks Serhiy, it works and I like the result :-)
>>> def f():
... def g():
... return 3
... return g
...
>>> import dis; dis.dis(f)
2 0 LOAD_CONST 1 (<code object g at 0x7f16ab2e2c40, file "<stdin>", line 2>)
2 LOAD_CONST 2 ('f.<locals>.g')
4 MAKE_FUNCTION 0
6 STORE_FAST 0 (g)
4 8 LOAD_FAST 0 (g)
10 RETURN_VALUE
Disassembly of <code object g at 0x7f16ab2e2c40, file "<stdin>", line 2>:
3 0 LOAD_CONST 1 (3)
2 RETURN_VALUE |
|
Date |
User |
Action |
Args |
2017-06-12 09:14:26 | vstinner | set | recipients:
+ vstinner, rhettinger, ncoghlan, belopolsky, pitrou, torsten, berker.peksag, serhiy.storchaka, jleedev, matrixise, Todd Dembrey |
2017-06-12 09:14:26 | vstinner | set | messageid: <1497258866.18.0.762537510215.issue11822@psf.upfronthosting.co.za> |
2017-06-12 09:14:26 | vstinner | link | issue11822 messages |
2017-06-12 09:14:25 | vstinner | create | |
|