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?
> 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
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