Doubt about closure/function generation in bytecode

July 13, 2013
6:41 a.m.
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? Andrea Griffini
4264
Age (days ago)
4266
Last active (days ago)
1 comments
2 participants
participants (2)
-
Andrea Griffini
-
Benjamin Peterson