[Python-projects] logilab-astng 0.17.1 bug?
Dave Borowitz
dborowitz at google.com
Mon Jul 9 21:06:56 CEST 2007
Hello again,
I've found a small issue with astng.
nodes.py:238, in NodeNG.nodes_of_class, has:
for matching in child_node.nodes_of_class(klass):
yield matching
I think what we want is child_node.nodes_of_class(klass, skip_klass). The
current behavior means that if there is more than one level of recursion,
then the original skip_klass is not applied. For a concrete example of bad
behavior, consider:
def foo():
if True:
def bar():
yield 'something'
Calling is_generator on the Function node of foo will return True even
though foo is not a generator, because the inner Function is not properly
skipped.
Thanks,
Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.logilab.org/pipermail/python-projects/attachments/20070709/0abae0ec/attachment.htm
More information about the Python-Projects
mailing list