Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #58387
| References | <CAFEUn8YwMwB6m9LGqsXK8iijK_DRnwv88Xxp8VP_x=Hq2TUnhQ@mail.gmail.com> |
|---|---|
| Date | 2013-11-03 03:55 -0700 |
| Subject | Re: Debugging decorator |
| From | Jason Friedman <jsf80238@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1977.1383476116.18130.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
> 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.
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Debugging decorator Jason Friedman <jsf80238@gmail.com> - 2013-11-03 03:55 -0700
csiph-web