[Python-Dev] PEP 343 - next steps

Barry Warsaw barry at python.org
Thu Jun 16 15:37:35 CEST 2005


On Sun, 2005-06-12 at 00:52, Nick Coghlan wrote:

> The idea behind 'with' is that the block is executed while holding 
> (i.e. 'with') the resource.
> 
> I think the '-ing' form of the example templates is a holdover from 
> the days when the PEP used the 'do' keyword - I find that past tense 
> or noun forms tend to read better than present tense for custom built 
> with templates named after the action that occurs on entry:
> 
>    # Past tense
>    with locked(my_lock):
>    with opened(my_file, mode):
>    with redirected_stdout(my_stream):

Work for me.  Thanks.
-Barry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/python-dev/attachments/20050616/44debb85/attachment.pgp


More information about the Python-Dev mailing list