I'm working on updating a type hinting and inference module in Apache Beam to support CPython 3.11 opcodes and have hit a snag working with test cases involving lambdas. The line dis.dis(lambda: {x for x in ()}, show_caches=True, adaptive=False) return the following in 3.10:
The 3.11 output has two distinct difference: it isn't pushing a qualified name for the lambda onto the stack for MAKE_FUNCTION, and the PRECALL and CALL opcodes have args of 0 indicating that there are no args to be passed to the function despite there being a constant on the top of the stack when CALL is executed. Is this expected behavior? I haven't been able to find any documentation around lambda handling being changed, and the existing documentation for the opcodes leads me to believe this is unintended.
Your environment
CPython versions tested on: 3.10, 3.11
Operating system and architecture: Linux, x86
The text was updated successfully, but these errors were encountered:
Bug report
I'm working on updating a type hinting and inference module in Apache Beam to support CPython 3.11 opcodes and have hit a snag working with test cases involving lambdas. The line
dis.dis(lambda: {x for x in ()}, show_caches=True, adaptive=False)
return the following in 3.10:But in 3.11 we get:
The 3.11 output has two distinct difference: it isn't pushing a qualified name for the lambda onto the stack for
MAKE_FUNCTION
, and thePRECALL
andCALL
opcodes have args of 0 indicating that there are no args to be passed to the function despite there being a constant on the top of the stack whenCALL
is executed. Is this expected behavior? I haven't been able to find any documentation around lambda handling being changed, and the existing documentation for the opcodes leads me to believe this is unintended.Your environment
The text was updated successfully, but these errors were encountered: