Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 376dc94f84239438fcfe1be44ebfd085a1d83000
Ticket: 862526872cda074626d8a1e020479acf44ed7009
Getting another object of the same type in dict and list for performance
User & Date: ferrieux on 2015-04-20 20:32:19
Changes

  1. closedate changed to: "2457133.35578027"
  2. closer changed to: "ferrieux"
  3. icomment:
    There is no such thing as a "force to string" by either list or dict containers; they do respect whatever current representation their contents have.
    
    In the examples given, constant *strings* like {1 1 2332 {12 12} } are passed in and gotten out. Make them shimmer before encapsulation, they'll keep their state:
    
     set x {1 2 3 4}
     lindex $x 0
     set a [list $x $x $x]
     set b [lindex $a 2]
     puts "b inner representation: \n\t[::tcl::unsupported::representation $b]\n"
    
    => 
     b inner representation: 
            value is a list with a refcount of 8, object pointer at 0x8daa208, internal representation 0x8df8db8:(nil), string representation "1 2 3 4"
    
  4. login: "ferrieux"
  5. mimetype: "text/plain"
  6. resolution changed to: "Invalid"
  7. status changed to: "Closed"