Skip to content
Tcl Source Code History Of Ticket 3041099
Login

History Of Ticket 3041099

Artifacts Associated With Ticket 3041099

  1. Ticket change [2fff2ce398] (rid 93168) by tombert on 2010-08-07 09:26:43:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Create a dictionary
      >  set mydict [dict create -range {-values {a b c} -base k}]
      -range {-values {a b c} -base k}
      
      Manipulate dictionary the correct way:
      >  dict set mydict -range -base M
      -range {-values {a b c} -base M}
      
      Manipulate dictionary the wrong way:
      >  dict set $mydict1 -range -base M
      -range {-base M}
      
      In my point of view there should be a check throwing an error when doing it the "wrong way".
      
      Regards
      thomas
      
      
      
      
    4. foundin initialized to: "obsolete: 8.5.8"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "tombert"
    10. subsystem initialized to: "16. Commands A-H"
    11. title initialized to: "dict variable check missing?"
    12. type initialized to: "Bug"
  2. Ticket change [e79dc2d279] (rid 104494) by ferrieux on 2010-08-07 16:35:01:

    1. closedate changed to: "2010-08-07T09:35:01"
    2. closer changed to: "ferrieux"
    3. icomment:
      In Tcl, everything is a string, and just about every string is a valid variable name.
      So, whatever $mydict1 is at the time, it is nevertheless a potential varname, that can legally hold the dict value you're creating with [dict set]. The fact that it contains spaces, which is likely if it's also a dict value, doesn't allow the Tcl runtime to dismiss it:
      
         dict set "foo bar" a b
      
         set "foo bar"
         -> a b
      
         dict get [set "foo bar"] a
         -> b
      
      
      
    4. login: "ferrieux"
    5. mimetype: "text/plain"
    6. resolution changed to: "Invalid"
    7. status changed to: "Closed"
    8. username: "ferrieux"