| Ticket UUID: | 1881284 | ||
| Title: | [variable] should cope with no arguments | ||
| Type: | RFE | Created on: | 2008-01-28 17:12:17 |
| Submitter: | coldstore | Assigned to: | dgp |
| Subsystem: | 07. Variables | Severity: | |
| Priority: | 5 Medium | Last modified: | 2009-10-02 02:13:41 |
| Status: | Closed | Closed by: | dgp |
| Resolution: | Accepted | Closed on: | 2009-10-01 19:13:41 |
| Version: | None | ||
| Description: | ||||
By analogy with 1671880 [variable] should be modified to permit no arguments. This enhancement would be useful for the following idioms: | ||||
| User Comments: | ||||
msofer added on 2008-06-28 23:04:12:
Logged In: YES user_id=148712 Originator: NO messagw truncated: which idioms? coldstore added on 2008-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.
dgp added on 2008-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
}
msofer added on 2008-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. nijtmans added on 2008-11-07 16:54:00:
Isn't this already done in the TIP #323 implementation? dgp added on 2009-10-02 02:13:37:
this is done. dgp added on 2009-10-02 02:13:41:
allow_comments - 1 | ||||
