[New-bugs-announce] [issue3994] import fixer misses some symbols

Mark Hammond report at bugs.python.org
Mon Sep 29 09:13:12 CEST 2008

New submission from Mark Hammond <mhammond at users.sourceforge.net>:

The following source file:
import _winreg
_winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, "foo")

results in the following "patch":

-import _winreg
-_winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, "foo")
+import winreg
+winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, "foo")

Note the first param has not been converted correctly.  This is probably
due to it following the paren, as using the same symbol in a local
variable works correctly.

components: 2to3 (2.x to 3.0 conversion tool)
messages: 74014
nosy: mhammond
priority: high
severity: normal
status: open
title: import fixer misses some symbols
type: behavior

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list