[Zope-dev] Relative Imports: PEP-328
Philipp von Weitershausen
philipp at weitershausen.de
Wed Oct 8 07:53:33 EDT 2008
Sidnei da Silva wrote:
> I'm trying to fix some import errors, which seem to be related to PEP-328.
>
> I'm fixing those errors this way, though I don't know if that's the
> recommended way of fixing it. Thoughts?
>
> """
> try:
> from DT_Util import parse_params, name_param
> except ImportError:
> # See PEP-328
> from .DT_Util import parse_params, name_param
> """
This will generate a SyntaxError in Python 2.4. So unless we *require*
Python >= 2.5, this won't work.
More information about the Zope-Dev
mailing list