lua-users home
lua-l archive

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


In Lua 5.3, when a key is equal to an integer, it is converted to an integer.
This is not an implementation detail, but is documented in §2.1 of the manual.

    To avoid ambiguities, any float with integral value used as a key
is converted
    to its respective integer.

In the light of this fact, is there a good reason why the definition
of a sequence
says "the set of its positive numerical keys is equal to {1..n} for some
non-negative integer n" instead of "the set of its positive integer-valued keys
is equal to {1..n} for some non-negative integer n"?