[variable] should cope with no arguments
Closed / Accepted1881284fffffffffffffffffffffffffffffffffCreated 19 years agoUpdated 17 years ago
Descriptionplain2008-01-28 17:12:17
By analogy with 1671880 [variable] should be modified to permit no arguments. This enhancement would be useful for the following idioms:
dkf Ticket [1881284fff]: 2 changes
[History diff]2008-01-29 15:56:57
msoferplain2008-06-28 23:04:12
Logged In: YES user_id=148712 Originator: NO messagw truncated: which idioms?
coldstoreplain2008-06-29 07:03:02
Logged In: YES
user_id=19214
Originator: YES
proc foo {args} {
variable {*}$args
}
is the idiom I was thinking of.
dgpplain2008-06-30 01:29:34
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
}
msoferplain2008-08-06 19:40:29
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.
nijtmansplain2008-11-07 16:54:00
Isn't this already done in the TIP #323 implementation?
dgpplain2009-10-02 02:13:37
this is done.
dgpplain2009-10-02 02:13:41
allow_comments - 1
Log in (anonymous is fine) to add a comment.