This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Suggestion for improving with documentation
Type: behavior Stage:
Components: Documentation Versions: Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Jason.Baker, docs@python, georg.brandl
Priority: normal Keywords:

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) * (Python committer) 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:06adminsetgithub: 53969
2010-09-03 22:40:37georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg115524

resolution: fixed
2010-09-03 17:51:34Jason.Bakercreate