➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 loewis
收信人 loewis
日期 2008-11-24.09:02:03
SpamBayes Score 0.00038586414
Marked as misclassified 否
Message-id <1227517326.18.0.828990199239.issue4405@psf.upfronthosting.co.za>
In-reply-to
内容
When trying to run 2to3 on Django, I get a traceback

  File "/tmp/py3/lib/python3.0/lib2to3/refactor.py", line 260, in
refactor_string
    self.refactor_tree(tree, name)
  File "/tmp/py3/lib/python3.0/lib2to3/refactor.py", line 299, in
refactor_tree
    self.traverse_by(self.post_order, tree.post_order())
  File "/tmp/py3/lib/python3.0/lib2to3/refactor.py", line 323, in
traverse_by
    new = fixer.transform(node, results)
  File "/tmp/py3/lib/python3.0/lib2to3/fixes/fix_metaclass.py", line
156, in transform
    for suite, i, stmt in find_metas(node):
  File "/tmp/py3/lib/python3.0/lib2to3/fixes/fix_metaclass.py", line
114, in find_metas
    if leaf_node.value == '__metaclass__':
AttributeError: 'Node' object has no attribute 'value'

The smallest example reproducing this is

class Model(object):
    __metaclass__ = ModelBase
    save.alters_data = True
历史
日期 用户 动作 参数
2008-11-24 09:02:06loewis修改recipients: + loewis
2008-11-24 09:02:06loewis修改messageid: <1227517326.18.0.828990199239.issue4405@psf.upfronthosting.co.za>
2008-11-24 09:02:04loewis链接issue4405 messages
2008-11-24 09:02:03loewis创建