|
2018-05-21
| ||
| 00:23 | • Ticket [3598385fff] dict exists doesn't produce an error for non-dict valu... artifact: 3c3c129373 user: aspect | |
|
2012-01-22
| ||
| 20:18 | • Closed ticket [3475264fff]: "dict exists" throws error when key path e... artifact: b4c9549b9c user: dkf | |
|
2012-01-18
| ||
| 13:49 | • Ticket [3475264fff]: 4 changes artifact: a38aefec8a user: blacksqr | |
| 06:32 | • New ticket [3475264fff]. artifact: b74e5825fa user: blacksqr | |
| Ticket UUID: | 3475264 | ||
| Title: | "dict exists" throws error when key path ends in value | ||
| Type: | Bug | Created on: | 2012-01-18 06:32:07 |
| Submitter: | blacksqr | Assigned to: | dkf |
| Subsystem: | 15. Dict Object | Severity: | |
| Priority: | 5 Medium | Last modified: | 2012-01-22 20:18:12 |
| Status: | Closed | Closed by: | dkf |
| Resolution: | Fixed | Closed on: | 2012-01-22 13:18:12 |
| Version: | obsolete: 8.5.11 | ||
| Description: | ||||
% dict set tst a b c d
a {b {c d}}
% dict exists $tst a b c
1
% dict exists $tst a b c d
missing value to go with key
The last command throws an error; since d is a value not a key, I expected simply to get a return value of "0".
| ||||
| User Comments: | ||||
blacksqr added on 2012-01-18 13:49:17:
from chat:
[00:12]SEHlooking for some wisdom on dicts
[00:12]SEH% dict set tst a b c d
[00:13]SEHa {b {c d}}
[00:14]SEH% dict exists $tst a b c d
[00:14]SEHget error; missing value to go with key
[00:14]SEHexpected simply to get "0"
[00:14]SEHbug?
[00:16]venksSEH - exists is for a key
[00:16]SEHright, but since d is not a key I expected to get "0", not an error
[00:16]venksah.
[00:17] * venks goes to check on his
[00:21]apnLooks like a bug to me
[00:22]venksyep - is a booooog.
dkf added on 2012-01-22 20:18:12:
allow_comments - 1 The one problem with this is that it makes it harder to know when you've done something silly like going too deep in a dictionary. Still, I buy the point that based on the current documentation it should not be throwing errors. Fixed for 8.5 and 8.6 | ||||
