.
D 2014-05-21T22:58:03.596
J assignee nobody
J closer nobody
J cmimetype text/plain
J comment When\sgiven\sonly\sone\sargument,\s[dict\sremove]\sand\s[dict\sreplace]\sseem\sto\sreturn\sthat\sargument\swithout\seven\slooking\sat\sit.\s\sConsequently,\sthey\scan\sbe\smade\sto\sreturn\snon-dicts\s(i.e.\sinvalid\slist\sor\sodd\slist\slength)\sand\snoncanonical\sdicts\s(i.e.\swith\sduplicate\skeys).\r\n\r\nWhen\sgiven\sonly\sone\sargument,\s[dict\smerge]\sforces\sthe\sargument\sto\sbe\sa\sdict\s(thereby\srejecting\snon-lists\sand\sodd-length\slists),\sbut\sthe\sstring\srepresentation\sis\spreserved.\s\sConsequently,\s[dict\smerge]\scan\sbe\smade\sto\sreturn\snoncanonical\sdicts.\r\n\r\n%\sdict\sremove\s\\{\\}x\r\n{}x\r\n%\sdict\sremove\s{a\s1\sb}\r\na\s1\sb\r\n%\sdict\sremove\s{a\s1\sb\s2\sa\s3}\r\na\s1\sb\s2\sa\s3\r\n%\sdict\sreplace\s\\{\\}x\r\n{}x\r\n%\sdict\sreplace\s{a\s1\sb}\r\na\s1\sb\r\n%\sdict\sreplace\s{a\s1\sb\s2\sa\s3}\r\na\s1\sb\s2\sa\s3\r\n%\sdict\smerge\s\\{\\}x\r\nlist\selement\sin\sbraces\sfollowed\sby\s"x"\sinstead\sof\sspace\r\n%\sdict\smerge\s{a\s1\sb}\r\nmissing\svalue\sto\sgo\swith\skey\r\n%\sdict\smerge\s{a\s1\sb\s2\sa\s3}\r\na\s1\sb\s2\sa\s3\r\n%\s::tcl::unsupported::representation\s[dict\smerge\s{a\s1\sb\s2}]\r\nvalue\sis\sa\sdict\swith\sa\srefcount\sof\s3,\sobject\spointer\sat\s0xbeb3b0,\sinternal\srepresentation\s0xbe11a0:0xbeb860,\sstring\srepresentation\s"a\s1\sb\s2"\r\n%\s::tcl::unsupported::representation\s[dict\smerge\s{a\s1\sb\s2\sa\s3}]\r\nvalue\sis\sa\sdict\swith\sa\srefcount\sof\s5,\sobject\spointer\sat\s0x1c3a560,\sinternal\srepresentation\s0x1c843a0:0x1c35790,\sstring\srepresentation\s"a\s1\sb\s2\sa\s3"\r\n\r\nContrast\swith\severy\sother\s[dict]\scommand\sthat\sreturns\sa\sdict\sand/or\ssets\sa\sdict\svariable.\s\sThey\sall\sproduce\sonly\scanonical\sdicts.\r\n\r\n%\sdict\sget\s{a\s1\sb\s2\sa\s3}\r\na\s3\sb\s2\r\n%\s::tcl::unsupported::representation\s[dict\sget\s{a\s1\sb\s2\sa\s3}]\r\nvalue\sis\sa\slist\swith\sa\srefcount\sof\s1,\sobject\spointer\sat\s0x99cc90,\sinternal\srepresentation\s0x9adb00:(nil),\sno\sstring\srepresentation\r\n%\s::tcl::unsupported::representation\s[dict\sget\s{a\s1\sb\s2}]\r\nvalue\sis\sa\slist\swith\sa\srefcount\sof\s1,\sobject\spointer\sat\s0x9a09e0,\sinternal\srepresentation\s0x9db0e0:(nil),\sno\sstring\srepresentation
J foundin cdc4e05235717e4959d745e4cc6670bd1333c783
J is_private 0
J login andy
J priority 5\sMedium
J private_contact 662c23482b0bf6a505f39e48fb7ad43af8dee4d3
J resolution None
J severity Minor
J status Open
J submitter andy
J subsystem 15.\sDict\sObject
J title Single-argument\s[dict\smerge/remove/replace]
J type Bug
K 1b0266d8bbc649bcb4df5dc4a1edca238536262b
U andy
Z ba14043fa5be3eeacabf9e888f67c55a