Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion ten small Python programs

View parsed - Show only message text

Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail
NNTP-Posting-Date: Sat, 26 May 2007 21:33:06 -0500
Date: Sat, 26 May 2007 20:33:04 -0600
From: Steven Bethard <steven.beth...@gmail.com>
User-Agent: Thunderbird 2.0.0.0 (Windows/20070326)
MIME-Version: 1.0
Newsgroups: comp.lang.python
Subject: Re: ten small Python programs
References: <mailman.8216.1180205410.32031.python-list@python.org>   <mcidnYViZIlYEcXbnZ2dnUVZ_uKknZ2d@comcast.com> <1180229019.873381.52800@m36g2000hse.googlegroups.com>
In-Reply-To: <1180229019.873381.52800@m36g2000hse.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <xfednWzLtfB_cMXbnZ2dnUVZ_judnZ2d@comcast.com>
Lines: 41
NNTP-Posting-Host: 67.166.43.236
X-Trace: sv3-AB6wxNhdf9H71CnGAU/wgKe5zw63WlxJEWae9+xYl+lU1dhaCwu+71pLF3eZGV/ELMa3T+ntqjJ9pMO!CVu0VT8rXoD/aSCeavWkBwJ3DNv5d08DSH3agiFBAir1Op1mbtfD8X9g+wCBHcZJGEoF22K9j/vQ!Z0KSO790sed2GFdliyoS2m3BfKn/aA==
X-Complaints-To: abuse@comcast.net
X-DMCA-Complaints-To: d...@comcast.net
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.34

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

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