Are Absolute Imports Available in Python 2.4 or Not?
PEP 328 looks like it will solve my recent import issues.
However, the PEP mentions that
In Python 2.4, you must enable the new absolute import behavior with from __future__ import absolute_import
which got me excited because it means I don't need to wait for Python 2.5 to take advantage of it.
However
from __future__ import absolute_import
gives
SyntaxError: future feature absolute_import is not defined
So that part of PEP 328 was just teasing me. I think it's an error in the PEP.
Comments (2)
Kent Johnson on Feb. 16, 2006:
Last Modified: Feb. 15, 2006
Author: jtauber
Moof on Feb. 16, 2006:
from . import module
legal?