Debugging decorator
Jason Friedman
jsf80238 at gmail.com
Sun Nov 3 05:55:08 EST 2013
> I wrote this decorator: https://gist.github.com/yasar11732/7163528
>
> I ran it with Python 2 and thought it was neat.
Most of my work is Python 3.
I ran 2to3-3.3 against it and I am getting this error:
$ ./simple.py
Traceback (most recent call last):
File "./simple.py", line 3, in <module>
@debugger.debugging
File "/home/jason/python/debugger.py", line 41, in debugging
new_function_body.append(make_print_node("function %s called" %
func.__name__))
File "/home/jason/python/debugger.py", line 6, in make_print_node
return ast.Print(dest=None, values=[ast.Str(s=s)], nl=True)
AttributeError: 'module' object has no attribute 'Print'
Comparing http://docs.python.org/2/library/ast.html#module-ast against
http://docs.python.org/3.3/library/ast.html#module-ast I see that "Print"
has indeed been removed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20131103/2185b75e/attachment.html>
More information about the Python-list
mailing list