Menu

#513 [variable] should cope with no arguments

closed-accepted
5
2009-10-01
2008-01-28
No

By analogy with 1671880 [variable] should be modified to permit no arguments.

This enhancement would be useful for the following idioms:

Discussion

  • Donal K. Fellows

    • labels: 322374 --> 07. Variables
    • assigned_to: dkf --> msofer
     
  • miguel sofer

    miguel sofer - 2008-06-28

    Logged In: YES
    user_id=148712
    Originator: NO

    messagw truncated: which idioms?

     
  • Colin McCormack

    Colin McCormack - 2008-06-29

    Logged In: YES
    user_id=19214
    Originator: YES

    proc foo {args} {
    variable {*}$args
    }

    is the idiom I was thinking of.

     
  • Don Porter

    Don Porter - 2008-06-29

    Logged In: YES
    user_id=80530
    Originator: NO

    Since [variable] takes alternating
    arguments to represent varname and values,
    I think the idiom is:

    proc foo {dict} {
    variable {*}$dict
    }

     
  • miguel sofer

    miguel sofer - 2008-08-06

    Logged In: YES
    user_id=148712
    Originator: NO

    This looks like a valuable RFE to me, I'd even extend it to [global], [upvar], [namespace upvar]. But it does require a simple TIP, as the docs (and tests) need changing.

     
  • Jan Nijtmans

    Jan Nijtmans - 2008-11-07

    Isn't this already done in the TIP #323 implementation?

     
  • Don Porter

    Don Porter - 2009-10-01

    this is done.

     
  • Don Porter

    Don Porter - 2009-10-01
    • assigned_to: msofer --> dgp
    • status: open --> closed-accepted
     
MongoDB Logo MongoDB