[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: prawget etc?
- From: Dirk Laurie <dirk.laurie@...>
- Date: Fri, 4 Oct 2013 11:57:48 +0200
2013/10/4 Sean Conner <sean@conman.org>:
> It was thus said that the Great Dirk Laurie once stated:
>> Next time this annoys me enough, I'll write a little module in C that
>> provides `prawget` and `prawset`, which stand in the same relationship
>> to `rawget` and `rawset` as `pcall` stands to `call`.
>>
>> Unless someone has already done it?
>
> Um ...
>
> function prawget(tab,idx)
> return pcall(rawget,tab,idx)
> end
>
> print(prawget(0,1))
> print("done")
>
> Seems simple enough ...
I can't complain, since it is just the sort of reply I also like to give.
I can't even argue about it, since any argument will then be thrown
back at me later. So — touché!