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

Danny Yoo dyoo at hashcollision.org
Wed Jan 1 09:04:38 CET 2014


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


More information about the Tutor mailing list