https://bugzilla.wikimedia.org/show_bug.cgi?id=47104
--- Comment #3 from Robert Rohde <[email protected]> --- (In reply to comment #2) > Cloning it (i.e. copying the key/value pairs individually) would defeat the > purpose. It'd be faster to use require(), which does give a writable table. This makes sense if one wants a writable copy of the whole thing, but the use cases I've tended to look at are things like: big_table = mw.loadData( "Module:BigData" ) Where big_table has lots of subtables and what one really wants to manipulate is only a small portion, e.g. my_part = big_table.group1.block5.subtable3. Cloning a small subtable is presumably faster than using require to load the whole thing. > You can use the index metamethod, as darklama suggests, if that is > appropriate > for your application. Actually, darklama's comment makes me wonder. Could that solution be adapted so that the loadData tables aren't read only? More specifically, could the wrapper be changed to allow one to add a layer of local values in front of the read only data whenever someone attempts to write to the table? That way the read-only original values could be preserved for the next #invoke, but users wouldn't have to worry about loadData tables being read only. -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
