PEP #99484663

Chad Netzer cnetzer at mail.arc.nasa.gov
Thu Nov 14 18:17:05 EST 2002


On Thursday 14 November 2002 14:16, Ian Bicking wrote:

> Intriguing.  I'm sure pychecker could add the check fairly easily,
> though most people will still program without delimiters.  I wouldn't
> mind making doubled-delimiters illegal, i.e.:
>
> def func():
>     return "something"
>     return "something else"

Instead, try writing:

def func():
    if 0: return "foo"
    else: return "bar"

rather than using commenting to switch between the two cases (for debugging, 
of course).  At least it is easier to strip these out later (rather than 
double, uncommented returns).  The parsing for your case could be non-trivial.

-- 
Bay Area Python Interest Group - http://www.baypiggies.net/

Chad Netzer
cnetzer at mail.arc.nasa.gov




More information about the Python-list mailing list