|
If you are politely suggesting that the definition of __len be extended to include an integral number value as the literal value to be used, then I concur that this would be a convenient and clear extension.
I like that.
-AndrewOn Sat, Jun 25, 2016 at 14:10 Soni L. <fakedme@gmail.com> wrote:
On 25/06/16 03:54 PM, Dirk Laurie wrote:
> 2016-06-25 20:44 GMT+02:00 Soni L. <fakedme@gmail.com>:
>
>> why doesn't __len support numbers?
> Why is a cow not a horse?
>
You can give a table to __index and __newindex. For constant-sized
types, it makes sense to use a number instead of a number-returning
function for __len.
--
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.