nodes.py IfExp patch

36 views
Skip to first unread message

Ricky Egeland

unread,
Apr 8, 2011, 3:40:44 PM4/8/11
to clonedigg...@googlegroups.com
Hi,

Here is a patch to add compiler.ast.IfExp.as_string in nodes.py. Lack of this method was causing clonedigger to fail for my project.

Question: what version of python was clonedigger tested for? I am wondering if the omission of IfExp was due to a new python feature or if it was just overlooked.

Cheers,
Ricky

nodes.py.patch

Peter Bulychev

unread,
Apr 20, 2011, 3:53:03 PM4/20/11
to clonedigg...@googlegroups.com
Dear Ricky,

sorry for long delay in answering, thank you for you patch.

Actually your patch is related to the logilab-astng module (http://www.logilab.org/856) .
I've just copied this module to the Clone Digger project tree, and since that nodes.py changed a lot (http://hg.logilab.org/logilab/astng/file/eca5337e3675/nodes.py). So I don't know if the bug you found is still presented in logilab-astng

Can you provide an example of code for which your patch is crucial?

2011/4/8 Ricky Egeland <ricky....@gmail.com>
--
You received this message because you are subscribed to the Google Groups "Clone Digger general" group.
To post to this group, send email to clonedigg...@googlegroups.com.
To unsubscribe from this group, send email to clonedigger_gen...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/clonedigger_general?hl=en.





--
Best regards,
   Peter Bulychev.

Ricky Egeland

unread,
Apr 21, 2011, 6:43:25 AM4/21/11
to Clone Digger general


On Apr 20, 4:53 pm, Peter Bulychev <peter.bulyc...@gmail.com> wrote:

> Can you provide an example of code for which your patch is crucial?

x = 1 if True else 2

Ricky Egeland

unread,
Apr 25, 2011, 8:58:02 AM4/25/11
to Clone Digger general


On Apr 20, 4:53 pm, Peter Bulychev <peter.bulyc...@gmail.com> wrote:

> Actually your patch is related to the logilab-astng module (http://www.logilab.org/856) .
> I've just copied this module to the Clone Digger project tree, and since
> that nodes.py changed a lot (http://hg.logilab.org/logilab/astng/file/eca5337e3675/nodes.py). So I don't
> know if the bug you found is still presented in logilab-astng

Ah ok. I didn't know that this was a copied library.

I quickly looked into the new nodes.py file that you linked, and it
looks like it is now a stub of variable declarations with no real
functionality added. However, they do acknowledge the "IfExp",
whereas before it was not present in the file. Presumably the newer
versions fix the problem that I encountered.
Reply all
Reply to author
Forward
0 new messages