Fix Python 3 list comprehansion closure bug

This commit is contained in:
rocky
2016-05-09 05:03:49 -04:00
parent 196495c40e
commit e37b197db9
5 changed files with 79 additions and 11 deletions

View File

@@ -0,0 +1,8 @@
# Test Python 3.x test semantic handling of
#
# load_closure ::= LOAD_CLOSURE BUILD_TUPLE_1
# ...
# listcomp ::= load_closure LOAD_LISTCOMP LOAD_CONST MAKE_CLOSURE_0 expr GET_ITER CALL_FUNCTION_1
def long_has_args(opt, longopts):
return [o for o in longopts if o.startswith(opt)]