Issue 9760: Suggestion for improving with documentation (original) (raw)
Issue9760
Created on 2010-09-03 17:51 by Jason.Baker, last changed 2022-04-11 14:57 by admin. This issue is now closed.
Messages (2) | ||
---|---|---|
msg115478 - (view) | Author: Jason Baker (Jason.Baker) | Date: 2010-09-03 17:51 |
http://docs.python.org/reference/compound_stmts.html#with This documentation refers to "context expressions" in two places. However, it never really defines what a context expression is. The formal syntax that's presented is this: with_stmt ::= "with" with_item ("," with_item)* ":" suite with_item ::= expression ["as" target] As best I can tell, the context expression is essentially the with_item. If that's the case, I propose one of the following: 1) The formal syntax is changed so that "with_item" becomes "context_expression". 2) References to "context expression" change to "with item". 3) The "context expression" is defined to be the with_item in the formal syntax at some point in the documentation. | ||
msg115524 - (view) | Author: Georg Brandl (georg.brandl) * ![]() |
Date: 2010-09-03 22:40 |
Actually, the with_item contains the context expression *and* the optional "as target" clause, so they are not equivalent I committed a clarification in r84482. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:57:06 | admin | set | github: 53969 |
2010-09-03 22:40:37 | georg.brandl | set | status: open -> closednosy: + georg.brandlmessages: + resolution: fixed |
2010-09-03 17:51:34 | Jason.Baker | create |