- changed status to resolved
Update With statement
Issue #3
resolved
In Python 3.4.2 (and possibly earlier), the With
statement has been updated to use withitem
nodes. (link to 3.4 grammar)The docs should be updated to reflect this change as follows:
- With: A
with
block.items
is a list ofwithitem
nodes containing the context managers andbody
is a list of nodes inside the statement - withitem: A single context manager in a
with
block.context_expr
is the context manager, often aCall
node.optional_vars
is aName
,Tuple
orList
for theas foo
part, orNone
if that isn’t used.
Comments (2)
-
repo owner -
repo owner Thanks for letting me know, should be fixed now.
- Log in to comment
Update With node for 3.3+
Fixes issue
#3→ <<cset 5e5f4fc729d9>>