[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: params to __tostring
- From: Kevin Martin <kev82@...>
- Date: Sat, 10 Nov 2012 17:53:02 +0000
On 10 Nov 2012, at 12:25, spir wrote:
> Is there a way to pass additional params to the function pointed by __tostring? (Would be practicle for instance to pass the set of already seen tables in stringing functions specialised for arrays, maps, objects, trees…)
I can't envisage an example of where this is necessary or useful. However, can you not just use an upvalue in your tostring to store previously passed values?
Thanks,
Kev