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

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to