lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Tue, Jun 9, 2015 at 12:02 AM, Parke <parke.nexus@gmail.com> wrote:
> On Mon, Jun 8, 2015 at 7:37 PM, Coda Highland <chighland@gmail.com> wrote:
>> Worse, [Python's local-by-default] makes upvalues very challenging, as they are neither local
>> nor global yet no way exists to explicitly target them in Python 2.x.
>> (If you try to assign to an upvalue, you instead create a new local
>> that shadows it!)
>
> Is this fixed in Python 3.x?


Yes. Python 3.x introduces the `nonlocal` keyword for that purpose.