[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lpeg question
- From: Dirk Laurie <dirk.laurie@...>
- Date: Tue, 13 Mar 2018 22:46:28 +0200
2018-03-13 22:33 GMT+02:00 Dibyendu Majumdar <mobile@majumdar.org.uk>:
> I don't interpret the manual that way. I read that as saying that you
> cannot modify the length operator for a string. But __len is defined
> as a length operation, is it not?
Now what makes you think that length must be an integer?
$ lua -l complex
Lua 5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio
> complex.__len = complex.abs
> #complex.new(3,4)
5.0