Overview
| Artifact ID: | bf41ebf1a2bc3546b69b64f5fa8a1e1e28ab953c |
|---|---|
| Ticket: | 3169002fffffffffffffffffffffffffffffffff
conversion from "dict" to "list" loses object types |
| User & Date: | sehmann on 2011-01-31 22:10:25 |
Changes
- assignee changed to: "msofer"
- cmimetype changed to: "text/plain"
- comment changed to:
When we use "array get" a dict object is returned. If this is used directly in a foreach all types are preserved. The problem arises when the result is copied. It seems like the fix is to simply copy the objects as they are when converting from dict to list (tcl8.4.9 just appends the array object into the result list) rather than stringify the objects. we are trying to upgrade our system from 8.4.9 to 8.5.9 and this is a blocker. % array set a "" % set a(b) "1" 1 % set a(c) [list 1 2] 1 2 % otype [array get a] dict % set l [array get a] b 1 c {1 2} % otype $l dict % otype $l dict % foreach key [array get a] { puts "[otype $key]" } string int string list % otype $l dict % foreach key $l { puts "[otype $key]" } string string string string % otype $l list % puts $l b 1 c {1 2} % - foundin changed to: "obsolete: 8.5.9"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "sehmann"
- subsystem changed to: "10. Objects"
- title changed to:
conversion from "dict" to "list" loses object types
- type changed to: "Bug"