[Python-projects] PyLint + rpython: Error reported "Using unavailable builtin"

Sylvain Thénault sylvain.thenault at logilab.fr
Tue Mar 6 11:19:38 CET 2007


On Tuesday 06 March à 11:13, Maarten ter Huurne wrote:
> 
> syt at logilab.fr wrote on 2007-03-05 10:22:17 PM:
> 
> > On Monday 05 March à 22:15, Maarten ter Huurne wrote:
> > > ************* Module testcase4
> > > E:  1: Using unavailable builtin 'sum'
> > > ===
> > >
> > > I get similar errors on lots of files, complaining about keywords
> > 'lambda' and
> > > 'yield' and builtins 'callable', 'classmethod', 'dict', 'enumerate',
> 'file',
> > > 'filter', 'frozenset', 'getattr', 'globals', 'id', 'iter', 'long','object',
> > > 'open', 'property', 'reduce', 'reload', 'repr', 'reversed',
> 'set','setattr',
> > > 'sorted', 'staticmethod', 'sum', 'super' and 'unicode'.
> >
> > that's expected, those builtins are not available in restricted python.
> 
> What does that mean for the results I get from PyLint in rpython mode? There is
> no way our program can work while using none of those keywords and builtins. If
> I would disable messages E12xx, are the other messages I get still reliable? In
> other words, if the program being checked is ordinary Python instead of
> Restricted Python, will the rpython checker be able to say something useful
> about it?

the rpython checker is only intended to :
* check actual restricted python program that should be translatable by
  the pypy translator 
* see how much work is necessary to make a regular python program
  restricted python compliant

you should keep it deactivated on "normal" pylint usage.

-- 
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