mirror of https://github.com/python/cpython
OK, ready to make 'assert' a keyword (instead of '__assert__').
This commit is contained in:
parent
7aa9fc5642
commit
03a7466b8f
|
@ -49,7 +49,7 @@ global_stmt: 'global' NAME (',' NAME)*
|
||||||
## accesstype should be ('public' | 'protected' | 'private') ['read'] ['write']
|
## accesstype should be ('public' | 'protected' | 'private') ['read'] ['write']
|
||||||
## but can't be because that would create undesirable reserved words!
|
## but can't be because that would create undesirable reserved words!
|
||||||
exec_stmt: 'exec' expr ['in' test [',' test]]
|
exec_stmt: 'exec' expr ['in' test [',' test]]
|
||||||
assert_stmt: '__assert__' test [',' test]
|
assert_stmt: 'assert' test [',' test]
|
||||||
|
|
||||||
compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | funcdef | classdef
|
compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | funcdef | classdef
|
||||||
if_stmt: 'if' test ':' suite ('elif' test ':' suite)* ['else' ':' suite]
|
if_stmt: 'if' test ':' suite ('elif' test ':' suite)* ['else' ':' suite]
|
||||||
|
|
|
@ -1377,7 +1377,7 @@ static label labels[124] = {
|
||||||
{1, "exec"},
|
{1, "exec"},
|
||||||
{293, 0},
|
{293, 0},
|
||||||
{1, "in"},
|
{1, "in"},
|
||||||
{1, "__assert__"},
|
{1, "assert"},
|
||||||
{282, 0},
|
{282, 0},
|
||||||
{283, 0},
|
{283, 0},
|
||||||
{284, 0},
|
{284, 0},
|
||||||
|
|
Loading…
Reference in New Issue