Re: Comments merging, pass 2

Bob Ippolito <bob-Zl9L/[email protected]>
Newsgroups gmane.comp.web.pyblosxom.devel
Message-ID <[email protected]>
On Dec 11, 2004, at 9:46 PM, Steven Armstrong wrote:

> will guaraldi wrote:
>> Remember, other people have to maintain this code.
>
> You've got a point there.
>
> Here's the rewritten patch. It is impossible to do an if/else where I 
> need the check to happen, so I moved it to a function.
>
> I also changed the ".has_key(...)" to "in" (__contains__) as Bob 
> proposed. Didn't know that that is the same.

You can say:
	foo not in bar

instead of:
	not foo in bar

I'm not sure if the bytecode is any different, but the first appeals to 
me aesthetically.

The other nit I have is backslash line \
continuation

because it's so goddamn fragile and reminds me of C macros.. I (always 
use
parentheses) instead.

Of course parentheses don't work for import statements prior to 2.4, 
but it does work for every other statement that I can think of (there 
may be another obscure exception).

-bob



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.