variable declaration

Steve Holden steve at holdenweb.com
Tue Feb 1 11:28:16 EST 2005


Thomas Bartkus wrote:

> "Carl Banks" <invalidemail at aerojockey.com> wrote in message
> news:1107205410.367521.50490 at f14g2000cwb.googlegroups.com...
> <snip>
> 
>>How common is it for a local variable to be bound in
>>more than one place within a function?
> 
> 
> How common?  It shouldn't happen at all and that was the point.

This seems a little excessive to me. Sample use case:

for something in lst:
   if type(something) != type(()):
     something = tuple(something)

regards
  Steve
-- 
Meet the Python developers and your c.l.py favorites March 23-25
Come to PyCon DC 2005          http://www.python.org/pycon/2005/
Steve Holden                           http://www.holdenweb.com/



More information about the Python-list mailing list