Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 09cea47

Browse files
committed
Don't allow '==' at top level yet, to catch conversion errors.
1 parent 6a468bf commit 09cea47

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Grammar/Grammar

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# Grammar for Python, version 10
22

33
# Changes since version 9:
4-
# Equality is now only tested with '=='; consequently
5-
# Exprlist replaced by testlist everywhere except after 'for'
4+
# Equality is now only tested with '=='
65

76
# Changes since version 8:
87
# Trailing commas in formal parameter lists are allowed
@@ -64,7 +63,7 @@ fpdef: NAME | '(' fplist ')'
6463
stmt: simple_stmt | compound_stmt
6564
simple_stmt: small_stmt (';' small_stmt)* [';'] NEWLINE
6665
small_stmt: expr_stmt | print_stmt | del_stmt | pass_stmt | flow_stmt | import_stmt | global_stmt
67-
expr_stmt: (testlist '=')* testlist
66+
expr_stmt: (exprlist '=')* exprlist
6867
# For assignments, additional restrictions enforced by the interpreter
6968
print_stmt: 'print' (test ',')* [test]
7069
del_stmt: 'del' exprlist

0 commit comments

Comments
 (0)