V version: 0.1.20 c8a781b
OS: Win 10 1809
What did you do?
Maps related REPL
What did you expect to see?
>>> wang:={'1':2,'3':4}
>>> wang.keys()
["1", "3"]
What did you see instead?
>>> mut miao:={'1':2,'3':4}
>>> miao.keys()
["1", "3"]
>>> wang:={'1':2,'3':4}
>>> wang.keys()
C:\Program Files\v\.vrepl_temp.v:4:18: `wang` is immutable, declare it with `mut`
By the way, in addition to the bug described, why the output is ["1", "3"] and not ['1', '3']? Double quote is 'illegal caracter' in V, so why do we output the result in "illegal" way? :)
Of course, in general I would urge (again?) to rethink usage of single and double quotes in V for string literals in general, as double quotes are much more common in programming languages for strings with interpolation. But this should be put in a separate issue. Sorry. :)
Like the docs say, " will be supported too.
" is now supported :) @avitkauskas
Fixed @wh-timme
Most helpful comment
Like the docs say, " will be supported too.