[Python-Dev] 'With' context documentation draft (was Re: Terminology for PEP 343 (original) (raw)

Ron Adam rrr at ronadam.com
Sat Jul 16 00:09:24 CEST 2005


Guido van Rossum wrote:

On 7/15/05, Ron Adam <rrr at ronadam.com> wrote: [several new syntax proposals]

Please stop proposing new syntax. The PEP was accepted after quite enough back-and-forth; there's no point opening this up yet again.

My apologies Guido.

Subtracting the inappropriate syntax suggestions leaves the following hopefully on-topic documentation suggestions.

It may be good to have a stronger association to "try" in the documentation by:

 1. Suggesting to the programmer that in many situations a with can 

be thought of as 'try with'.

 2. Reminding or clarify that a with will handle the object or 

context cleanup, but the programmer may still need to catch exceptions that are generated within the block with a "try-except" at some point.

 3. The "with" documentation could possibly be grouped with or after 

the "try" documentation as it may be easier to understand in that context.

Regards, Ron



More information about the Python-Dev mailing list