Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails on decimal.py #11

Closed
pts opened this issue Jul 30, 2011 · 1 comment
Closed

Fails on decimal.py #11

pts opened this issue Jul 30, 2011 · 1 comment
Assignees

Comments

@pts
Copy link

pts commented Jul 30, 2011

$ minipy.py -o d2.py decimal.py

Traceback (most recent call last):
  File "/home/pts/d/minipy.py", line 909, in <module>
    main()
  File "/home/pts/d/minipy.py", line 897, in main
    minified = serialize_ast(tree, encoding=encoding, **opts.__dict__)
  File "/home/pts/d/minipy.py", line 722, in serialize_ast
    return SerializeVisitor(**kwargs).serialize(tree)
  File "/home/pts/d/minipy.py", line 126, in serialize
    minified = dump(parse(result))
  File "/usr/lib/python2.6/ast.py", line 37, in parse
    return compile(expr, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 116
    '''def handle(self,context,*args):pass
         ^
SyntaxError: invalid syntax

(Fails similarly with both Python 2.6 and Python 2.7.)

Get decimal.py from http://pastebin.com/XnqXBuEE .

@ghost ghost assigned gareth-rees Jul 30, 2011
@gareth-rees
Copy link
Owner

Thanks for the bug report. There are at least three issues here. There's a problem with string handling (issue #13), a problem with 0 else (issue #12), and there's a problem with negative numbers (issue #15).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants