[New-bugs-announce] [issue6406] NameError on 2to3 tool

Alejandro Santos report at bugs.python.org
Fri Jul 3 14:33:29 CEST 2009

New submission from Alejandro Santos <alejolp at alejolp.com>:

Using the -j switch of the 2to3 tool shiped with Python 3.1 final i'm

Traceback (most recent call last):
  File "/home/alejo/apps/local/bin/2to3", line 6, in <module>
  File "/home/alejo/apps/local/lib/python3.1/lib2to3/main.py", line 132,
in main
  File "/home/alejo/apps/local/lib/python3.1/lib2to3/refactor.py", line
553, in refactor
    for i in xrange(num_processes)]
NameError: global name 'xrange' is not defined

Attached patch seems to work fine.

components: 2to3 (2.x to 3.0 conversion tool)
files: 2to3-xrange.patch
keywords: patch
messages: 90048
nosy: alejolp, djc
severity: normal
status: open
title: NameError on 2to3 tool
type: crash
versions: Python 3.1
Added file: http://bugs.python.org/file14436/2to3-xrange.patch

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list