[Mailman-Developers] Python style

Richard Wackerbarth richard at nfsnet.org
Thu Apr 12 17:19:27 CEST 2012


Just an update on my parsing.

•• Your introspection idea works very well as a substitute for a case statement in start/end Element.
It should allow me to produce readable code for the handling.

An added benefit is that, for each tag, I will be able to physically group the code for the startElement operation with the code for the endElement operation. Doing so makes it easier to see the pairing of beginning and ending side effects.

•• Having looked further into the new "print" and ".format", I think that I can use it once I get over my historical bias.
However, I still have the mental image of pipelining characters down a stream. :) Perhaps I can get over that.

On Apr 11, 2012, at 11:03 AM, Barry Warsaw wrote:
> whitespace: Use 4 space indents.  Never use tabs.

One of my biggest complaints about python -- using the amount/kind of whitespace to define the block structure.

I can say the same thing about "make" ---

>> MM3.UseEnglish = MM2.EnglishRequested or MM2.DefaultsToEnglish

> There can definitely be a value in writing these kinds of DSLs (domain
> specific languages) but I think in this case, writing idiomatic Python is
> going to be the best route. 

>> but it would be less complex if I can accomplish the goal without doing so.
> 
> Agreed.

•• I'm still looking for suggested syntax for "readable" transform rules.

•• After some thought about locating common definitions, etc., I have some thoughts. I'll put them in a new thread (or two or three) on -developers

Richard


More information about the Mailman-Developers mailing list