[Python-Dev] Re: anonymous blocks
Steve Holden
steve at holdenweb.com
Thu Apr 21 13:11:56 CEST 2005
Guido van Rossum wrote:
>>>IMO this is clearer, and even shorter!
>>
>>But it clutters the namespace with objects you don't need.
>
>
> Why do people care about cluttering namespaces so much? I thought
> thats' what namespaces were for -- to put stuff you want to remember
> for a bit. A function's local namespace in particular seems a
> perfectly fine place for temporaries.
>
Indeed. The way people bang on about "cluttering namespaces" you'd be
forgiven for thinking that they are like attics, permanently attached to
the house and liable to become cluttered over years.
Most function namespaces are in fact extremely short-lived, and there is
little point worrying about clutter as long as there's no chance of
confusion.
regards
Steve
--
Steve Holden +1 703 861 4237 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
More information about the Python-Dev
mailing list