TIP #163: A [DICT MERGE] SUBCOMMAND ===================================== Version: $Revision: 1.4 $ Author: Joe English State: Final Type: Project Tcl-Version: 8.5 Vote: Done Created: Friday, 14 November 2003 URL: https://tip.tcl-lang.org163.html Post-History: ------------------------------------------------------------------------- ABSTRACT ========== This TIP proposes a new [dict] subcommand which is used to combine multiple dictionaries. SPECIFICATION =============== dict merge ''dictVal1'' ''dictVal2'' ''...'' ''dictValN'' Returns a new dictionary containing all the key/value pairs in /dictVal1/ through /dictValN/. In the case of duplicate keys, values from later arguments override those from earlier ones. IMPLEMENTATION ================ See SF Patch #745851 EXAMPLES ========== See the EXAMPLES section of return(n), which currently reads: set options [eval [list dict create -level 1] $args] This could be replaced with set options [dict merge {-level 1} $args] NOTES ======= This feature was suggested during the discussion of [TIP #111], but since the vote was already in progress it was not considered at that time. COPYRIGHT =========== This document has been placed in the public domain. ------------------------------------------------------------------------- TIP AutoGenerator - written by Donal K. Fellows