Is there a shorter way to do this:
local thisismytable = {
non = sequitur
}
thisismytable.whatismytable = thisismytable
Any help would be appreciated. I don't want to re-create pre-existing functionality.
No.
If you can stand the difference between these two expressions thisismytable:whatismytable()
instead of thisismytable.whatismytable
, you could do:
local thisismytable = {
non = sequitur,
whatismytable = function (self) return self end
}
Testing:
print(thisismytable)
print(thisismytable:whatismytable())
More usage:
print(thisismytable:whatismytable().non)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With