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

Aurélien Campéas aurelien.campeas at logilab.fr
Tue Mar 6 11:18:13 CET 2007


On Tue, Mar 06, 2007 at 11:13:48AM +0100, 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?

No.

The rpython mode is intended for use with RPython *only* and loses any
meaning when applied to a plain Python program.

Note that if you really intend to write rpython code, either you
implement the missing python builtin functionality (not an especially
easy task) or you do without.

Cheers,
Aurélien.


More information about the Python-Projects mailing list