lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I'd like to request that a rawtostring() function be included in
a future version of Lua.  Otherwise my root object's default
tostring method looks something like this : :)

local function base_TOSTRING(self)
   local old_tostring;
   old_tostring = getmetatable(self).__tostring;
   getmetatable(self).__tostring = nil;
   local rtn = "Object("..tostring(self)..")";
   getmetatable(self).__tostring = old_tostring;
   return rtn;

I'd be willing to create and submit a patch if it's something
that the Lua authors agree with.

Adam D. Moss   . ,,^^   co:3
"At this point the rocket becomes engorged with astronauts."