Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

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

  1. assignee changed to: "msofer"
  2. cmimetype changed to: "text/plain"
  3. 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}
    %
    
    
  4. foundin changed to: "obsolete: 8.5.9"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "sehmann"
  10. subsystem changed to: "10. Objects"
  11. title changed to:
    conversion from "dict" to "list" loses object types
    
  12. type changed to: "Bug"