New submission from mmaenpaa <[email protected]>:

In Pypy it is not possible to copy ast-nodes that have missing fields or 
attributes.

For example:

>>>> import ast
>>>> import copy
>>>> n = ast.Num(n=2,lineno=2)
>>>> n2 = copy.deepcopy(n)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "lib-python/2.7/copy.py", line 182, in deepcopy
    rv = reductor(2)
AttributeError: 'Num' object has no attribute 'col_offset'

----------
messages: 6484
nosy: mmaenpaa, pypy-issue
priority: bug
release: 2.2
status: unread
title: Can't copy AST-nodes that have missing fields

________________________________________
PyPy bug tracker <[email protected]>
<https://bugs.pypy.org/issue1673>
________________________________________
_______________________________________________
pypy-issue mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-issue

Reply via email to