+1472
-655
lines changedFilter options
+1472
-655
lines changed Original file line number Diff line number Diff line change
@@ -800,6 +800,7 @@ the variables:
800
800
single: PyExc_SystemError
801
801
single: PyExc_SystemExit
802
802
single: PyExc_TabError
803
+
single: PyExc_TargetScopeError
803
804
single: PyExc_TimeoutError
804
805
single: PyExc_TypeError
805
806
single: PyExc_UnboundLocalError
@@ -901,6 +902,8 @@ the variables:
901
902
+-----------------------------------------+---------------------------------+----------+
902
903
| :c:data:`PyExc_TabError` | :exc:`TabError` | |
903
904
+-----------------------------------------+---------------------------------+----------+
905
+
| :c:data:`PyExc_TargetScopeError` | :exc:`TargetScopeError` | |
906
+
+-----------------------------------------+---------------------------------+----------+
904
907
| :c:data:`PyExc_TimeoutError` | :exc:`TimeoutError` | |
905
908
+-----------------------------------------+---------------------------------+----------+
906
909
| :c:data:`PyExc_TypeError` | :exc:`TypeError` | |
Original file line number Diff line number Diff line change
@@ -69,7 +69,7 @@ assert_stmt: 'assert' test [',' test]
69
69
70
70
compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | with_stmt | funcdef | classdef | decorated | async_stmt
71
71
async_stmt: 'async' (funcdef | with_stmt | for_stmt)
72
-
if_stmt: 'if' test ':' suite ('elif' test ':' suite)* ['else' ':' suite]
72
+
if_stmt: 'if' namedexpr_test ':' suite ('elif' namedexpr_test ':' suite)* ['else' ':' suite]
73
73
while_stmt: 'while' test ':' suite ['else' ':' suite]
74
74
for_stmt: 'for' exprlist 'in' testlist ':' suite ['else' ':' suite]
75
75
try_stmt: ('try' ':' suite
@@ -83,6 +83,7 @@ with_item: test ['as' expr]
83
83
except_clause: 'except' [test ['as' NAME]]
84
84
suite: simple_stmt | NEWLINE INDENT stmt+ DEDENT
85
85
86
+
namedexpr_test: test [':=' test]
86
87
test: or_test ['if' or_test 'else' test] | lambdef
87
88
test_nocond: or_test | lambdef_nocond
88
89
lambdef: 'lambda' [varargslist] ':' test
@@ -108,7 +109,7 @@ atom: ('(' [yield_expr|testlist_comp] ')' |
108
109
'[' [testlist_comp] ']' |
109
110
'{' [dictorsetmaker] '}' |
110
111
NAME | NUMBER | STRING+ | '...' | 'None' | 'True' | 'False')
111
-
testlist_comp: (test|star_expr) ( comp_for | (',' (test|star_expr))* [','] )
112
+
testlist_comp: (namedexpr_test|star_expr) ( comp_for | (',' (namedexpr_test|star_expr))* [','] )
112
113
trailer: '(' [arglist] ')' | '[' subscriptlist ']' | '.' NAME
113
114
subscriptlist: subscript (',' subscript)* [',']
114
115
subscript: test | [test] ':' [test] [sliceop]
@@ -134,6 +135,7 @@ arglist: argument (',' argument)* [',']
134
135
# multiple (test comp_for) arguments are blocked; keyword unpackings
135
136
# that precede iterable unpackings are blocked; etc.
136
137
argument: ( test [comp_for] |
138
+
test ':=' test |
137
139
test '=' test |
138
140
'**' test |
139
141
'*' test )
Original file line number Diff line number Diff line change
@@ -52,6 +52,7 @@ AT '@'
52
52
ATEQUAL '@='
53
53
RARROW '->'
54
54
ELLIPSIS '...'
55
+
COLONEQUAL ':='
55
56
56
57
OP
57
58
ERRORTOKEN
Original file line number Diff line number Diff line change
@@ -108,6 +108,7 @@ PyAPI_DATA(PyObject *) PyExc_NotImplementedError;
108
108
PyAPI_DATA(PyObject *) PyExc_SyntaxError;
109
109
PyAPI_DATA(PyObject *) PyExc_IndentationError;
110
110
PyAPI_DATA(PyObject *) PyExc_TabError;
111
+
PyAPI_DATA(PyObject *) PyExc_TargetScopeError;
111
112
PyAPI_DATA(PyObject *) PyExc_ReferenceError;
112
113
PyAPI_DATA(PyObject *) PyExc_SystemError;
113
114
PyAPI_DATA(PyObject *) PyExc_SystemExit;
Original file line number Diff line number Diff line change
@@ -50,6 +50,7 @@ typedef struct _symtable_entry {
50
50
including free refs to globals */
51
51
unsigned ste_generator : 1; /* true if namespace is a generator */
52
52
unsigned ste_coroutine : 1; /* true if namespace is a coroutine */
53
+
unsigned ste_comprehension : 1; /* true if namespace is a list comprehension */
53
54
unsigned ste_varargs : 1; /* true if block has varargs */
54
55
unsigned ste_varkeywords : 1; /* true if block has varkeywords */
55
56
unsigned ste_returns_value : 1; /* true if namespace uses return with
Original file line number Diff line number Diff line change
@@ -128,6 +128,7 @@
128
128
"SystemError",
129
129
"SystemExit",
130
130
"TabError",
131
+
"TargetScopeError",
131
132
"TypeError",
132
133
"UnboundLocalError",
133
134
"UnicodeDecodeError",
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4