Created
April 29, 2014 09:56
-
-
Save edgurgel/11395715 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hey guys, | |
Now that ListDict is dead, I'm using List API and I find annoying that we need to specify the key position on the tuple (I know this is not a dict) and I think it would be nice to have position as 0 by default. | |
My proposal is to have a function with less arguments that call the original with 0. We could have position on the end as optional argument, but this would break people's code and maybe harder to read. | |
keyreplace(list, key, new_tuple) -> keyreplace(list, key, 0, new_tuple) | |
This would be keyreplace, keystore, keyfind. Also other functions that already have position on the end could be 0 by default. | |
I think this could help people that is moving from ListDict (at least for some usages). | |
What you guys think? | |
Thanks in advance, | |
Eduardo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment