Mercurial > cpython-lru_cache-weakref
annotate Lib/test/badsyntax_future7.py @ 25838:8540887bcec6 2.2
Backport of 2.183:
Fix memory leak in add_subclass() found by NealN with valgrind.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 18 Oct 2002 13:42:21 +0000 |
| parents | d06bbb8c493a |
| children | 47eaa38b29cb |
| rev | line source |
|---|---|
|
17558
d06bbb8c493a
Fix compileall.py so that it fails on SyntaxErrors
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
1 """This is a test""" |
|
d06bbb8c493a
Fix compileall.py so that it fails on SyntaxErrors
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
2 |
|
d06bbb8c493a
Fix compileall.py so that it fails on SyntaxErrors
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
3 from __future__ import nested_scopes; import string; from __future__ import \ |
|
d06bbb8c493a
Fix compileall.py so that it fails on SyntaxErrors
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
4 nested_scopes |
|
d06bbb8c493a
Fix compileall.py so that it fails on SyntaxErrors
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
5 |
|
d06bbb8c493a
Fix compileall.py so that it fails on SyntaxErrors
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
6 def f(x): |
|
d06bbb8c493a
Fix compileall.py so that it fails on SyntaxErrors
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
7 def g(y): |
|
d06bbb8c493a
Fix compileall.py so that it fails on SyntaxErrors
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
8 return x + y |
|
d06bbb8c493a
Fix compileall.py so that it fails on SyntaxErrors
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
9 return g |
|
d06bbb8c493a
Fix compileall.py so that it fails on SyntaxErrors
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
10 |
|
d06bbb8c493a
Fix compileall.py so that it fails on SyntaxErrors
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
11 print f(2)(4) |
