Re: Where I do ask for a new feature

2023-10-20 Thread dn via Python-list
On 21/10/2023 01.32, Thomas Passin via Python-list wrote: On 10/19/2023 11:16 PM, Bongo Ferno via Python-list wrote: On Thursday, October 19, 2023 at 11:26:52 PM UTC-3, avi.e...@gmail.com wrote: There are many ways to make transient variables that disappear at some time and do we need yet

Re: Where I do ask for a new feature

2023-10-20 Thread Michael Torrie via Python-list
On 10/19/23 19:32, Bongo Ferno via Python-list wrote: > >> You can actually just do that with simple assignment! >> >> short_view = my_object.stuff.long_stuff.sub_object >> print(short_view.some_method()) > > but then have to delete the variable manually > > del short_view Why? It's just a

RE: Where I do ask for a new feature

2023-10-20 Thread AVI GROSS via Python-list
f Roel Schroeven via Python-list Sent: Friday, October 20, 2023 3:55 AM To: python-list@python.org Subject: Re: Where I do ask for a new feature 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...@gmail.com wrote: > >

Re: Where I do ask for a new feature

2023-10-20 Thread Thomas Passin via Python-list
On 10/19/2023 11:16 PM, Bongo Ferno via Python-list wrote: On Thursday, October 19, 2023 at 11:26:52 PM UTC-3, avi.e...@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

Re: Where I do ask for a new feature

2023-10-20 Thread Roel Schroeven via Python-list
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...@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 >

Re: Where I do ask for a new feature

2023-10-20 Thread Cameron Simpson via Python-list
On 19Oct2023 20:16, Bongo Ferno wrote: 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. No it doesn't: >>> with open('/dev/null') as f: ... print(f) ... <_io.TextIOWrapper

Re: Where I do ask for a new feature

2023-10-20 Thread Bongo Ferno via Python-list
On Thursday, October 19, 2023 at 11:26:52 PM UTC-3, avi.e...@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

RE: Where I do ask for a new feature

2023-10-19 Thread AVI GROSS via Python-list
thon-list On Behalf Of Bongo Ferno via Python-list Sent: Thursday, October 19, 2023 9:33 PM To: python-list@python.org Subject: Re: Where I do ask for a new feature > You can actually just do that with simple assignment! > > short_view = my_object.stuff.long_stuff.sub_object &

Re: Where I do ask for a new feature

2023-10-19 Thread Bongo Ferno via Python-list
> You can actually just do that with simple assignment! > > short_view = my_object.stuff.long_stuff.sub_object > print(short_view.some_method()) but then have to delete the variable manually del short_view -- https://mail.python.org/mailman/listinfo/python-list

Re: Where I do ask for a new feature

2023-10-16 Thread Chris Angelico via Python-list
On Tue, 17 Oct 2023 at 12:55, Bongo Ferno via Python-list wrote: > > Where I can ask python developers for a new feature? > > This feature would allow us to create short aliases for long object paths, > similar to the with statement. This would make code more readable and > maintainable. > >

Where I do ask for a new feature

2023-10-16 Thread Bongo Ferno via Python-list
Where I can ask python developers for a new feature? This feature would allow us to create short aliases for long object paths, similar to the with statement. This would make code more readable and maintainable. For example, if we have a long object like "MyObject.stuff.longStuff.SubObject",