
On Sun, 3 May 2009 07:35:29 am Jan Claeys wrote:
Op donderdag 23-04-2009 om 05:53 uur [tijdzone -0700], schreef Aahz:
How do non-keyword builtins bite?
You can accidentally "re-define" or mask them (if you don't use a tool that warns for that).
Cross out "accidentally", and the ability to shadow built-ins is a feature, not a bug. Anything that you do accidentally is a problem. You can accidentally shadow a module, or one of your own functions or names. And while Python has a rich set of built-ins, it isn't so many that learning them is a burden. I would expect that the average newbie would accidentally shadow a built-in once or twice, then never do it again. (Especially if they hang around comp.lang.python and get yelled at every time they do it.) -- Steven D'Aprano