On 19Oct2023 20:16, Bongo Ferno <bongofe...@gmail.com> 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/null' mode='r' encoding='UTF-8'>
    >>> print(f)
    <_io.TextIOWrapper name='/dev/null' mode='r' encoding='UTF-8'>
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to