[Python-projects] pylint and commons patch for explicit relative imports

Sylvain Thénault sylvain.thenault at logilab.fr
Thu Feb 7 10:13:55 CET 2008


On Thu, Feb 07, 2008 at 10:12:53AM +0100, Stefan Rank wrote:
> One more thing: I did not test the patch on older python versions
> (< 2.5), and From nodes in py2.4 probably don't have a .level attribute.
>
> The code might need a::
>
>    try:
>        level = node.level
>    except AttributeError:
>        level = 0
>
> in one or two places...

Yes, I've encountered this and fixed it in logilab/astng.
-- 
Sylvain Thénault                               LOGILAB, Paris (France)
Formations Python, Zope, Plone, Debian:  http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
Python et calcul scientifique:           http://www.logilab.fr/science



More information about the Python-Projects mailing list