Overview
| Artifact ID: | b76c95893e54615c938759f2fa625f0565e384726db17d284f8ceab8cac9e9b3 |
|---|---|
| Ticket: | 0e4b7fce57ddc428e5fab63a237e43c039be428b
Running [info vars] in a namespace returns global variables |
| User & Date: | sbron on 2024-07-14 13:20:29 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-markdown"
- comment changed to:
Running `info vars` in a fresh namespace in Tcl 9 reports the same list of variables that Tcl 8.6 does; the existing global variables. However, since [TIP #278](https://core.tcl-lang.org/tips/doc/trunk/tip/278.md) was implemented, global variables are no longer directly visible from within a namespace. They can only be accessed using their fully qualified names. It is therefor unexpected that `info vars` still reports them, especially by their simple name. I also don't think the globals should be reported by `info vars` using their fully qualified name, because all variables can be accessed using their fully qualified names. Then, if globals are included that way, then all variables in all namespaces should be included. That would quickly become a mess.
- foundin changed to: "9.0b2"
- is_private changed to: "0"
- login: "sbron"
- priority changed to: "5 Medium"
- private_contact changed to: "8475f421649231f1e116ac602bea4537d2b027b4"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "sbron"
- subsystem changed to: "07. Variables"
- title changed to:
Running [info vars] in a namespace returns global variables
- type changed to: "Bug"