[Ironpython-users] Retrieving comments from FunctionDefinition nodes in c#

Venkatesh Potluri venky.92 at gmail.com
Tue May 2 08:08:05 EDT 2017


Hi list,

I am unable to extract comments corresponding to a python function
using IronPython in c#. Despite the python code corresponding to the
FunctionDefinition node having comments, the FunctionDefinition
node.documentation seems to be empty.

What exactly am I missing?
I am attaching my c# function override for Bool
walk(FunctionDefinition node) and the python code I use for testing.

// C# code:
class MyWalker:PythonWalker {
    public override bool Walk(ClassDefinition node)
    {
        Trace.TraceInformation(node.Documentation);
        return True;
    }
}

###Python Code that this is tested against:
def printHello():
    """This is a test DocString comment."""
    return 'hello'


I do not get any output. the string is empty.

Thank you and best regards,
Venkatesh


More information about the Ironpython-users mailing list