Artifacts Associated With Ticket d22ad20205509329
Ticket change [87f9039ad3] (rid 164382) by oehhar on 2018-07-02 10:24:28:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-wiki"
- comment initialized to:
If a dictionary key is unset, there is no error, if it does not exist: <verbatim> % set d {} % dict unset d a </verbatim> <hr /> There is an error raised, if a key on the path of the subkey does not exist: <verbatim> % set d {} % dict unset d a b key "a" not known in dictionary </verbatim> IMHO this is inconsistent and should not rise an error. At least the documentation should write about error behaviour. <hr /> I can understand, that an error is raised, if the (sub)dict is not a valid dict. <verbatim> % set d {1} % dict unset d a missing value to go with key % set d {a 1} % dict unset d a b missing value to go with key </verbatim> - foundin initialized to: "8.6.8"
- is_private initialized to: "0"
- login: "oehhar"
- priority initialized to: "5 Medium"
- private_contact initialized to: "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "oehhar"
- subsystem initialized to: "15. Dict Object"
- title initialized to:
"dict unset d key subkey" fails if key does not exist
- type initialized to: "Bug"
Ticket change [823f434d5a] (rid 164383) by sebres on 2018-07-02 11:03:13:
- icomment:
Still worse (as regards the inconsistency), it does not produce any error if dictionary self (variable) does not exists: <code><verbatim> % unset -nocomplain d % catch { dict unset d a } 0 </verbatim></code> So I'm agree with Harald's conclusion, the `dict unset` must not produce an error if sub-key does not exists also. - login: "sebres"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [110ef0dbb8] (rid 164384) by sebres on 2018-07-02 11:04:59:
- foundin changed to: ">= 8.5"
- login: "sebres"
- mimetype: "text/plain"
Ticket change [393f75ecb9] (rid 188605) by oehhar on 2020-11-16 14:19:30:
- icomment:
Tested again with tcl8.6.10. Is fixed. Thank you, Harald
- login: "oehhar"
- mimetype: "text/x-fossil-wiki"
- username: "oehhar"
- icomment:
Ticket change [69d5a81801] (rid 188606) by oehhar on 2020-11-16 14:19:43:
- closedate changed to: "2459170.09702749"
- closer changed to: "oehhar"
- login: "oehhar"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"