[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Indexing a table with nil returns nil?
- From: Dimitris Papavasiliou <dpapavas@...>
- Date: Thu, 5 Apr 2012 17:31:19 +0300
Hi,
I just noticed that indexing a table with nil as in the following session actually returns nil when the manual is explicit about the fact that nil and NaN are not allowed as keys. It doesn't bother me really and I imagine it can be useful at times, but is this deliberate? If so shouldn't it be documented or did I just miss it in the manual?
Lua 5.2.0 Copyright (C) 1994-2011 Lua.org, PUC-Rio
> a = {};return a[nil]
nil
Dimitris