Message info
 
To:Barry Warsaw From:Richard Wackerbarth Subject:Re: [Mailman-Developers] Python style Date:Thu, 12 Apr 2012 10:19:27 -0500
 

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
_______________________________________________
Mailman-Developers mailing list
Mailman-Developers@python.org
http://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: http://mail.python.org/mailman/options/mailman-developers/archive%40all-mail-archive.com

Security Policy: http://wiki.list.org/x/QIA9