APOLOGY: My e-mail client (Thunderbird) crashed as I hit Send; I don't
know if it was actually sent.
Therefore I am sending it again - sorry if it's a duplicate post.
Rob Cliffe
On 26/05/2020 20:03, Chris Angelico wrote:
On Wed, May 27, 2020 at 2:51 AM Steven D'Aprano <st...@pearwood.info>
wrote:
But doing otherwise, having Undef be *not an object* but a kinda ghost
in the interpreter, is a huge language change and I doubt it would be
worth it.
But is it a huge change? I thought so too, until Greg suggested a
quite plausible option: leave the local unbound. There'd be two
changes needed, and one of them could have other value. The semantics
would be exactly the same as any other unbound local.
def foo():
if False: x = 0
# what is x now?
There is no *value* in x, yet x has a state.
[snip]
Sorry, I don't think it does. It's not in locals(), it doesn't exist
anywhere in memory.
It might be created later in foo(), but it would then have a value.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/python-ideas@python.org/message/FWIL5IVXJJYHOCZKWDLT7XYJBYZAIHR6/
Code of Conduct: http://python.org/psf/codeofconduct/