Mercurial > cpython-lru_cache-weakref
annotate Lib/test/badsyntax_future7.py @ 28646:193b8aec00ce legacy-trunk
Changes from Jonathan Riehl to allow his pgen extension (PEP 269) to
work. This includes some more code that used to be part of pgen in
the main parser; I'm okay with that. I'll see if the Windows build
needs work next.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 17 Apr 2003 14:55:42 +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) |
