Skip to content

ast.unparse can't deal with CPPCodeValue #265

Open
@gordonwatts

Description

@gordonwatts

Is there a way we could "tap" into ast.unparse?

ast.unparse(source)
"Select(Where(EventDataset(), lambda e: 1 > 10), lambda e: Select(('hi'), lambda j: j.pt()))"
ast.dump(source)
"Call(func=Name(id='Select', ctx=Load()), args=[Call(func=Name(id='Where', ctx=Load()), args=[Call(func=Name(id='EventDataset', ctx=Load())), Lambda(args=arguments(args=[arg(arg='e')]), body=Compare(left=Constant(value=1), ops=[Gt()], comparators=[Constant(value=10)]))]), Lambda(args=arguments(args=[arg(arg='e')]), body=Call(func=Name(id='Select', ctx=Load()), args=[Call(func=CPPCodeValue(), args=[Constant(value='hi')]), Lambda(args=arguments(args=[arg(arg='j')]), body=Call(func=Attribute(value=Name(id='j', ctx=Load()), attr='pt', ctx=Load())))]))])"

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions