On Mon, Apr 30, 2018 at 6:20 PM, Matt Arcidy wrote:
> Does this mean indentation is now a scope, or colons are a scope, or is that
> over simplifying?
No, no, and yes. This is JUST about the 'except' statement, which
currently has the weird effect of unbinding the name it just
On Sat, Apr 28, 2018, 20:16 Chris Angelico wrote:
> There's been a lot of talk about sublocal scopes, within and without
> the context of PEP 572. I'd like to propose what I believe is the
> simplest form of sublocal scopes, and use it to simplify one specific
> special case in
Chris Angelico wrote:
1) Bind the caught exception to a sublocal 'e'
2) Execute the suite, with the reference to 'e' seeing the sublocal
3) Set the sublocal e to None
4) Unbind the sublocal e
At the unindent, the sublocal name will vanish, and the original 'e'
will reappear.
That's a
On 29 April 2018 at 21:24, Chris Angelico wrote:
> On Sun, Apr 29, 2018 at 6:03 PM, Nick Coghlan wrote:
> > The challenge with doing this implicitly is that there's no indication
> > whatsoever that the two "e"'s are different, especially given the
> >
On Sun, Apr 29, 2018 at 6:03 PM, Nick Coghlan wrote:
> The challenge with doing this implicitly is that there's no indication
> whatsoever that the two "e"'s are different, especially given the
> longstanding precedent that the try/except level one will overwrite any
>
On 29 April 2018 at 13:14, Chris Angelico wrote:
> There's been a lot of talk about sublocal scopes, within and without
> the context of PEP 572. I'd like to propose what I believe is the
> simplest form of sublocal scopes, and use it to simplify one specific
> special case in
On Sun, Apr 29, 2018 at 01:14:54PM +1000, Chris Angelico wrote:
[...]
> def f():
> e = 2.71828
> try:
> 1/0
> except Exception as e:
> print(e)
> print(e)
> f()
> I propose to change the semantics as follows:
>
> 1) Bind the caught exception to a sublocal 'e'
>
There's been a lot of talk about sublocal scopes, within and without
the context of PEP 572. I'd like to propose what I believe is the
simplest form of sublocal scopes, and use it to simplify one specific
special case in Python.
There are no syntactic changes, and only a very slight semantic