Discussion:
Questions regarding relative import
Chitrank Dixit
2013-05-16 19:59:03 UTC
Permalink
Hello Python developers

I am working on Porting to Python 2 to Python 3.3 and the refactoring using
2to3 says to use relative import at the place of the import. but ignoring
the relative import does the work for both the python 2 as well as python
3.3

So Does 2to3 is made as per refactoring from python 2 to python 3.2 ?



*Regards
*
*Chitrank Dixit
*
*IIPS-DAVV
*
*Indore (M.P.) , India *
*MCA
*
*trackleech.blogspot.in*
Lennart Regebro
2013-05-17 04:47:41 UTC
Permalink
Post by Chitrank Dixit
Hello Python developers
I am working on Porting to Python 2 to Python 3.3 and the refactoring using
2to3 says to use relative import at the place of the import. but ignoring
the relative import does the work for both the python 2 as well as python
3.3
Absolute imports work in both Python 2 and Python 3, yes.

Importing from within the module requires the relative syntax in Python 3.

//Lennart

Loading...