Menu

#1318 conditional imports can't resolve alias

open
5
2011-04-20
2011-04-20
No

Say you have something like this:

try:
import unittest2 as unittest
except ImportError:
import unittest

Autocomplete and Ctrl + Mouse 1 resolves to the unittest module in the stdlib, but unittest2.__init__ inside site-packages is expected.

I'm using Pydev 2.0, on Mac OS X 10.6.7, Eclipse 3.6.2, and running a Virutalenv interpreter.

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.