[pypy-issue] [issue1673] Can't copy AST-nodes that have missing fields

mmaenpaa tracker at bugs.pypy.org
Mon Jan 13 15:30:05 CET 2014


New submission from mmaenpaa <mika.j.maenpaa at iki.fi>:

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 <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1673>
________________________________________


More information about the pypy-issue mailing list