Ticket UUID: | 461635 | |||
Title: | new [info] subcommand: formalargs | |||
Type: | Patch | Version: | None | |
Submitter: | glennjnn | Created on: | 2001-09-14 19:17:08 | |
Subsystem: | 17. Commands I-L | Assigned To: | dgp | |
Priority: | 5 Medium | Severity: | ||
Status: | Closed | Last Modified: | 2003-04-11 23:21:33 | |
Resolution: | Rejected | Closed By: | dgp | |
Closed on: | 2003-04-11 16:21:33 | |||
Description: |
[info args procname] does not return any default values. One must resort to iterating over the results from [info args], calling [info default] for each one, and build up a list. It would be more convenient to have an [info] subcommand in the core that accomplishes that feat. I propose [info fullargs procname]: proc t1 [list one [list two ""] args] {} info fullargs t1 ;# ==> one {two {}} args | |||
User Comments: |
dgp added on 2003-04-11 23:21:33:
Logged In: YES user_id=80530 TIP 65 rejected. dgp added on 2003-03-21 12:05:12: File Added - 45592: 461635.patch Logged In: YES user_id=80530 combined changes into one patch updated patch to HEAD corrected test numbering (tests should keep the same ID over Tcl history) Changed to [info formalargs] as last TIPped. dkf added on 2001-09-17 17:33:00: Logged In: YES user_id=79902 Why do you think I said it needed a TIP? :^) nobody added on 2001-09-17 17:18:01: Logged In: NO I might suggest 'info args -withdefaults'. If we only examine the option when there is a 4th argument, there are also no backwards compatibility issues with the unlikely possibility of a proc called '-withdefaults'. -- Vince. dkf added on 2001-09-17 16:33:10: Logged In: YES user_id=79902 This feature *requires* a TIP; I'm not too sure if I like the name 'fullargs' either... :^) Implementation looks technically OK though. glennjnn added on 2001-09-15 02:24:13: File Added - 10800: info.test.diff glennjnn added on 2001-09-15 02:23:28: File Added - 10799: info.n.diff glennjnn added on 2001-09-15 02:21:53: File Added - 10798: tclCmdIL.diff |
Attachments:
- 461635.patch [download] added by dgp on 2003-03-21 12:05:12. [details]
- info.test.diff [download] added by glennjnn on 2001-09-15 02:24:13. [details]
- info.n.diff [download] added by glennjnn on 2001-09-15 02:23:27. [details]
- tclCmdIL.diff [download] added by glennjnn on 2001-09-15 02:21:53. [details]