Where I do ask for a new feature

Roel Schroeven roel at roelschroeven.net
Fri Oct 20 03:55:12 EDT 2023


Op 20/10/2023 om 5:16 schreef Bongo Ferno via Python-list:
> On Thursday, October 19, 2023 at 11:26:52 PM UTC-3, avi.e... at gmail.com wrote:
>
> > There are many ways to make transient variables that disappear at some time 
> > and do we need yet another? Yes, you can create one of those ways but what 
> > is the big deal with deleting a variable when no longer used? 
>
> Assigning a variable to something can be anything else than a temporal alias.
> A with statement makes clear that the alias is an alias and is local, and it automatically clears the variable after the block code is used.
>
> Python clutters the variable space with vars that are needed only on certain places, and an alias doesn't has a scope.
> Convenient alias are short names, and short names are limited in quantity. If the space is cluttered with short alias, it opens risks for wrong utilization.
>
> Its like writing a "for i" in a list comprehension and having to worry if "i" was already used in another place..
As long as functions are kept reasonably short, which is a good idea 
anyway, I don't really see any of that as a problem.

-- 
"Experience is that marvelous thing that enables you to recognize a
mistake when you make it again."
         -- Franklin P. Jones



More information about the Python-list mailing list