On 01/01/2014 07:13 AM, eryksun wrote:
>I'm afraid I've lost the context, and don't understand why this is
>important. It's true that not all built-in objects are in builtins, and
>not all objects in builtins are built-in, but other than for pedantic
>correctness, why does this matter?
Denis said:
>"iter" is also the name of a builtin function, like "print"
My point was that the issue with iter is a namespace issue. It doesn't
matter that it's a built-in function like "print". Denis could have
meant that either way, so I thought it important to clarify. Why? A
while back there was a thread on the list confusing "built-in"
functions/methods in the io module and the builtins namespace, and
there was even an erroneous bug report filed on a doc string.
https://mail.python.org/pipermail/tutor/2013-June/096218.html
http://bugs.python.org/issue18249
You are very right, eryksyn, I was not clear at all, in fact it was not clear in
my knowledge.
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?).
Denis
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor