[Tutor] lists of lists: more Chutes & Ladders!

Mark Lawrence breamoreboy at yahoo.co.uk
Wed Jan 1 10:04:27 CET 2014


On 01/01/2014 08:04, Danny Yoo wrote:
>> My point was: `iter` the func exists in python (built-in with '-'), one may
>> use it at times. Giving an application var this name hides, which
>> accosionnally leads to bugs. I have been bitten by such a bug more than once
>> in the past, and once hard to find, asp. with the built-in func `range` (a
>> very tempting var name, isn't it?).
>
> Just as a small side note: there are linters for Python that will warn
> if we are trying to redefine a built-in.  Pylint, for example, has
> warning W0622 "Redefining built-in" to catch this class of gotchas.
>
>      http://www.pylint.org/

As I pointed out on 18/12/2013 and Walter Prins followed up on, you can 
use pylint in Eclipse/Pydev as you type, must have saved me eons.  I'd 
assume other IDEs have similar mechanisms.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence



More information about the Tutor mailing list