RE: Why no warnings when re-assigning builtin names?

2011-08-17 Thread Gerrat Rickert
> On 8/16/2011 7:29 PM, Terry Reedy wrote: > > On 8/16/2011 1:15 PM, Gerrat Rickert wrote: > > > I think that best practices would suggest that one shouldn't use > > variable > > names that shadow builtins (except in specific, special > circumstances), >

RE: Why no warnings when re-assigning builtin names?

2011-08-16 Thread Gerrat Rickert
> On Aug 16, 2011, at 1:15 AM, Steven D'Aprano wrote: ... > A warning that is off by default won't help the people who need it, > because > they don't know enough to turn the warning on. A warning that is on by > default will be helpful to the newbie programmer for the first week or > so, > and the

Why no warnings when re-assigning builtin names?

2011-08-15 Thread Gerrat Rickert
With surprising regularity, I see program postings (eg. on StackOverflow) from inexperienced Python users accidentally re-assigning built-in names. For example, they'll innocently call some variable, "list", and assign a list of items to it. ...and if they're _unlucky_ enough, their program m