Commit 664a102e authored by Stefan Behnel's avatar Stefan Behnel

Merge branch '0.23.x'

parents 0a8f5192 3f684dfe
...@@ -418,6 +418,7 @@ class NameReference(object): ...@@ -418,6 +418,7 @@ class NameReference(object):
ref.node = deepcopy(self.node, memo) ref.node = deepcopy(self.node, memo)
ref.entry = self.entry ref.entry = self.entry
ref.pos = self.node.pos ref.pos = self.node.pos
return ref
class ControlFlowState(list): class ControlFlowState(list):
......
...@@ -532,8 +532,20 @@ def complex_finally_clause(x, obj): ...@@ -532,8 +532,20 @@ def complex_finally_clause(x, obj):
from contextlib import contextmanager from contextlib import contextmanager
with contextmanager(lambda: (yield 1))() as y: with contextmanager(lambda: (yield 1))() as y:
assert y == 1 assert y == 1
a = 1
with nogil:
if i > 0:
with gil:
assert obj.method
a = 2
# FIXME: prevent deep-copying inner functions
#def closure(l):
# assert l == lobj
#closure()
assert name[0] in string.ascii_letters assert name[0] in string.ascii_letters
string.Template("-- huhu $name --").substitute(**{'name': '(%s)' % name}) string.Template("-- huhu $name --").substitute(**{'name': '(%s)' % name})
if a:
a = 3
del l[0], lobj[0] del l[0], lobj[0]
assert all(i == 3 for i in l), l assert all(i == 3 for i in l), l
return 99 return 99
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment