Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
ANRC Universe
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Module talk:TableTools
(section)
Add topic
Module
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Add topic
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Duplicate handling with "invert" == I wonder if it would be useful to have something like {{code|invert|lua}} that supports duplicates by providing values that are arrays of indices from the original input array. β[[User:Uzume|Uzume]] ([[User talk:Uzume|talk]]) 19:37, 17 December 2021 (UTC) :Currently, <code>p.invert({'a','b','c','a'})</code> would give <code>{a=4,b=2,c=3}</code>. I think the proposal is that it might give <code>{a={1,4},b=2,c=3}</code>. Perhaps, but this kind of consideration might be best handled after considering a real need at Wikipedia. Another possibility would be to throw an error if a duplicate occurs, possibly controlled by a parameter saying what should happen with duplicates. I don't think we should worry about that unless a need arises. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 01:01, 18 December 2021 (UTC) ::{{re|Johnuniq}} I agree about waiting for an actual need but I thought I would bring up this lack of functionality anyway. I was thinking more along the lines of: {{code|p.invert{'a','b','c','a'}|lua}}β{{code|{a{{=}}{1,4},b{{=}}{2},c{{=}}{3}<noinclude/>}|lua}} but you got the gist of my suggestion/observation.β[[User:Uzume|Uzume]] ([[User talk:Uzume|talk]]) 23:00, 30 December 2021 (UTC)
Summary:
Please note that all contributions to ANRC Universe may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
ANRC Universe:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Module talk:TableTools
(section)
Add topic