Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion For review: PEP 343: Anonymous Block Redux and Generator Enhancements
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Nicolas Fleury  
View profile  
 More options Jun 3 2005, 3:26 pm
Newsgroups: comp.lang.python
From: Nicolas Fleury <nid_o...@yahoo.com_remove_the_>
Date: Fri, 03 Jun 2005 15:26:54 -0400
Local: Fri, Jun 3 2005 3:26 pm
Subject: Re: For review: PEP 343: Anonymous Block Redux and Generator Enhancements

Guido van Rossum wrote:
> After many rounds of discussion on python-dev, I'm inviting public
> comments for PEP 343. Rather than posting the entire PEP text here,
> I'm inviting everyone to read it on line
> (http://www.python.org/peps/pep-0343.html) and then post comments on a
> Wiki page I've created for this purpose
> (http://wiki.python.org/moin/WithStatement).

> I think this is a good one; I hope people agree. Its acceptance will
> obsolete about 4 other PEPs! (A sign that it fulfills a need and that
> the proposed solution is powerful.)

I like the PEP very much; I guess most C++ programmers are missing that
capability in Python.  (I was following the discussion on python-dev,
and I'm pleased and surprised how good the result/compromise is).

What about making the ':' optional (and end implicitly at end of current
block) to avoid over-indentation?

def foo():
     with locking(someMutex)
     with opening(readFilename) as input
     with opening(writeFilename) as output
     ...

would be equivalent to:

def foo():
     with locking(someMutex)
         with opening(readFilename) as input
             with opening(writeFilename) as output
                 ...

Regards,

Nicolas


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google