Skip to content
Tcl Source Code View Ticket
Login

View Ticket

namespace(n) documentation doesn't reflect TIP#278 changes

Closed / Fixed53ac20f94bd0a749e9688fcdf8ed07f376c80c6aCreated 3 years agoUpdated 2 years ago
Descriptionplain2024-05-24 23:49:37
With Tcl 9 variable resolution behaves as stated on TIP#278

$ cat varresolv.tcl 
namespace eval a {variable a; set a ""}
namespace eval b {proc b {} {namespace which -variable a::a}}
puts [b::b]
$ tclsh8.6 varresolv.tcl 
::a::a
$ tclsh9.0 varresolv.tcl 

$

However, namespace(n) still reads

       ยท Variable names are always resolved by looking first in the  current namespace, and then in the global namespace.
Referenced by3
jan.nijtmanswiki2024-06-13 13:13:14

Proposed fix [here]

Please review (anyone).

apnadkarniplain2024-06-19 10:15:18
Changes look reasonable to me.
jan.nijtmanswiki2024-06-19 11:05:28

Thanks for the review!

bhaiblemarkdown2024-07-01 16:34:49

It is not yet published at https://www.tcl.tk/man/tcl9.0/TclCmd/namespace.html#M26 .

Log in (anonymous is fine) to add a comment.