Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion ten small Python programs
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
 
Steven Bethard  
View profile  
 More options May 27 2007, 12:33 pm
Newsgroups: comp.lang.python
From: Steven Bethard <steven.beth...@gmail.com>
Date: Sat, 26 May 2007 20:33:04 -0600
Local: Sun, May 27 2007 12:33 pm
Subject: Re: ten small Python programs

Paul McGuire wrote:
> I ***love*** this "10 Little Programs" idea!  As soon as I get a
> breathing space, I'm going to add a "10 Little Parsers" page to the
> pyparsing wiki!

> On May 26, 2:38 pm, Steven Bethard <steven.beth...@gmail.com> wrote:
>> <nitpick>
>> Though the code should probably follow PEP 8 guidelines, e.g.
>> under_scores instead of camelCase for object and method names:

>>      http://www.python.org/dev/peps/pep-0008/
>> </nitpick>

> Really?  Underscore-separated words preferred over camel case?  What
> is the rationale for this?

Rationale?  It's a style guide.  There is no rationale. ;-)

> If we want to just say "well, PEP-8 says such and such," I think this
> is an area where the thinking has possibly evolved since 2001.

I really don't think so. If anything, it's gotten more strict. PEP 8
used to allow either camelCase or under_scores. Now it only allows the
latter.

> I guess pyparsing with its mixedCase functions and attributes is
> doomed for the Dunce Corner.  Too bad for BeautifulSoup, cElementTree,
> and wxPython that are also at variance with this canon of Python
> coding style.

Many (if not all) of these modules were written before the most recent
incarnation of PEP 8. Thus, they fall under the second good reason "to
break a particular rule":

     (2) To be consistent with surrounding code that also breaks it

Of course, for new code, such as that in this thread, there's no reason
to break from the PEP 8 guidelines.

STeVe


    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