Path: news.eternal-september.org!eternal-september.org!newsgrouper.org!.POSTED!not-for-mail From: Colin Macleod Newsgroups: comp.lang.tcl Subject: Re: The best way to copy a list? References: <102tpah$2vfsm$1@dont-email.me> <102u86g$33dlm$2@dont-email.me> <102u9m8$33tvo$1@dont-email.me> Date: Wed, 18 Jun 2025 12:19:19 GMT Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-ID: <1750249159-7@newsgrouper.org> Injection-Info: newsgrouper.org; mail-complaints-to="newsgrouper@yahoo.com"; posting-account=user7 Injection-Date: Wed, 18 Jun 2025 12:19:19 GMT User-Agent: Newsgrouper/0.7.2 Organisation: shmorganisation X-Face: ;>4')~8UD=d.R[\.@A;)N{u_j#_=cmLx$}bIc4.3By~hf[q~|cf59?%bLtS)G@w#32G1%7y kz`PF}nwv'neqs,&gJm|V!,Xuekf[YIYQB7[Px"t#|rqb20( posted: > > I'm coming to Tcl from Python & Go. In Python saying `a = [1, 2, 3]` and > then `b = a` makes `b` a _reference_ to `a` rather than an independent > variable. Now I realise that Tcl doesn't do it that way and that `set a > $b` works fine. When I had to do some Python for work, after being familiar with Tcl, I was quite shocked to find that Python shares values in that way! 😲 -- Colin Macleod ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ https://cmacleod.me.uk Warning: Gumption level low, top-up when possible!