Mercurial > cpython-lru_cache-weakref
annotate Lib/test/badsyntax_future3.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 from __future__ import nested_scopes |
|
d06bbb8c493a
Fix compileall.py so that it fails on SyntaxErrors
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
3 from __future__ import rested_snopes |
|
d06bbb8c493a
Fix compileall.py so that it fails on SyntaxErrors
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
4 |
|
d06bbb8c493a
Fix compileall.py so that it fails on SyntaxErrors
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
5 def f(x): |
|
d06bbb8c493a
Fix compileall.py so that it fails on SyntaxErrors
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
6 def g(y): |
|
d06bbb8c493a
Fix compileall.py so that it fails on SyntaxErrors
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
7 return x + y |
|
d06bbb8c493a
Fix compileall.py so that it fails on SyntaxErrors
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
8 return g |
|
d06bbb8c493a
Fix compileall.py so that it fails on SyntaxErrors
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
9 |
|
d06bbb8c493a
Fix compileall.py so that it fails on SyntaxErrors
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
10 print f(2)(4) |
