lua-users home
lua-l archive

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


2011/10/13 Xavier Wang <weasley.wx@gmail.com>:
> Hi list :)
>
> I had notice a incompatible with Lua5.1 and Lua5.2-beta, that is in
> Lua 5.2 beta, the __len meta-method has two operand! though they are
> the same one (the userdata I used # operator),

The manual says:
> "len": the # operation.
>     function len_event (op)

Why do you say the __len metamethod has two operands?

D.