summaryrefslogtreecommitdiff
path: root/Grammar
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-01-01 14:51:57 +0000
committerGuido van Rossum <guido@python.org>1992-01-01 14:51:57 +0000
commit3a1433ff0769c079de9408cdbf23dba15da35804 (patch)
tree0072fe5f07fa89f5b988d04c9a64b7d047a5b52a /Grammar
parent27586aa599922f7de6e61de8b64b1c1a3fc02083 (diff)
downloadcpython-3a1433ff0769c079de9408cdbf23dba15da35804.tar.gz
Don't allow '==' at top level yet, to catch conversion errors.
Diffstat (limited to 'Grammar')
-rw-r--r--Grammar/Grammar5
1 files changed, 2 insertions, 3 deletions
diff --git a/Grammar/Grammar b/Grammar/Grammar
index 1ba2f52231..e61a874d9b 100644
--- a/Grammar/Grammar
+++ b/Grammar/Grammar
@@ -1,8 +1,7 @@
# Grammar for Python, version 10
# Changes since version 9:
-# Equality is now only tested with '=='; consequently
-# Exprlist replaced by testlist everywhere except after 'for'
+# Equality is now only tested with '=='
# Changes since version 8:
# Trailing commas in formal parameter lists are allowed
@@ -64,7 +63,7 @@ fpdef: NAME | '(' fplist ')'
stmt: simple_stmt | compound_stmt
simple_stmt: small_stmt (';' small_stmt)* [';'] NEWLINE
small_stmt: expr_stmt | print_stmt | del_stmt | pass_stmt | flow_stmt | import_stmt | global_stmt
-expr_stmt: (testlist '=')* testlist
+expr_stmt: (exprlist '=')* exprlist
# For assignments, additional restrictions enforced by the interpreter
print_stmt: 'print' (test ',')* [test]
del_stmt: 'del' exprlist