Skip to content

Handling of name collisions #71

@ekzhang

Description

@ekzhang

It seems that certain variable names can end up in name collisions in the generated code. For example, the code

def f(__print):
    print __print
    return __print * 4
y = f(5)
print y

is turned into the one-line code

(lambda __g, __print: [[(__print(y), None)[1] for __g['y'] in [(f(5))]][0] for __g['f'], f.__name__ in [(lambda __print: (lambda __l: [(__print(__l['__print']), (__l['__print'] * 4))[1] for __l['__print'] in [(__print)]][0])({}), 'f')]][0])(globals(), __import__('__builtin__').__dict__['print'])

which gives a TypeError when run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions