On 2/12/07, Brett Cannon <[EMAIL PROTECTED]> wrote:
> They all sound reasonable.  And it's nice to have a wanted feature be
> found from actual use.  =)

I've just uploaded patch #1659410 to SF, implementing the changes I outlined:

1) I changed some of the code emitted by asdl_c.py so _fields is
always a tuple. Where _fields used to be None, it's now a 0-element
tuple.

2) It turned out that {BinOp, BoolOp,AugAssign,etc}.op were already
singleton instances of their respective classes. I've changed
asdl_c.py to no longer emit the *_singleton names and to use the
corresponding *_type types in their place, which will enable me to
write "node.op is _ast.Add", etc.

3) Adding an Else node was a little more involved, but it proved
do-able. TryFinally.orelse, While.orelse, For.orelse and If.orelse can
now be either None or an instance of Else. Else instances have a
'body' attribute, which is a sequence of statements.

Thanks,
Collin Winter
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to