On Sat, Mar 24, 2018 at 05:09:54AM +1100, Chris Angelico wrote:
> >> Just as function-local names shadow global names for the scope of the
> >> function, statement-local names shadow other names for that statement.
> >> (They can technically also shadow each other, though actually doing this
> >> should not be encouraged.)
> >
> > That seems weird.
>
> Which part? That they shadow, or that they can shadow each other?
Shadowing themselves.
I'm still not convinced these should just shadow local variables. Of
course locals will shadow nonlocals, which shadow globals, which shadow
builtins. I'm just not sure that we gain much (enough?) to justify
adding a new scope between what we already have:
proposed statement-local
local
nonlocal
class (only during class statement)
global
builtins
I think that needs justification by more than just "it makes the
implementation easier".