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 ano
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
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:
>
>
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
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
>
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 name='/dev/
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 used?
n-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
> print
> 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
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.
>
> For
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", w
11 matches
Mail list logo