Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 5b92aa5e88f574429034bff8e2f6bbaf1e96551a
Ticket: 745851ffffffffffffffffffffffffffffffffff
[dict merge]
User & Date: jenglish on 2003-05-30 01:15:36
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    
    A useful addition to [dict] would be a command that
    sets multiple dictionary entries in a single step:
    
    dict merge $dictval1 $dictval2 ? ... $dictvalN ?
    
    which would return a copy of $dictval1, extended or
    modified by the values in $dictval2.  If multiple
    arguments are supplied, values in later arguments
    override those in earlier ones.
    
    That is:
    
    proc dict_merge {dict1 args} {
         foreach dict $args {
            foreach {key value} $dict {
                dict set $dict1 $key $value
            }
         }
        return $dict1
    }
    
    (This was discussed on tcl-core, but the vote on TIP
    111 was already in progress so it didn't make it into
    the initial implementation.)
    
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "jenglish"
  9. subsystem changed to: ""
  10. title changed to: "[dict merge]"
  11. type changed to: "Support"