MAKE_FUNCTION_8 -> MAKE_FUNCTION_CLOSURE

Clarity is important.
This commit is contained in:
rocky
2022-02-27 10:29:32 -05:00
parent ce5207333f
commit 219cb0606a
6 changed files with 19 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
# Python 3.6, uses rule:
# genexpr ::= load_closure load_genexpr LOAD_CONST
# MAKE_FUNCTION_8 expr GET_ITER CALL_FUNCTION_1
# MAKE_FUNCTION_CLOSURE expr GET_ITER CALL_FUNCTION_1
def __sub__(self, other): # SList()-other
return self.__class__(i for i in self if i not in other)

View File

@@ -4,8 +4,8 @@ def __init__(self, msg = None, digestmod = None):
self.digest_cons = lambda d='': digestmod.new(d)
# From Python 3.6 functools.py
# Bug was handling lambda for MAKE_FUNCTION_8 (closure)
# vs to MAKE_FUNCTION_9 (pos_args + closure)
# Bug was handling lambda for MAKE_FUNCTION_CLOSURE (closure)
# vs to MAKE_FUNCTION_CLOSURE_POS (pos_args + closure)
def bug():
def register(cls, func=None):
return lambda f: register(cls, f)