Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Marko Rauhamaa Newsgroups: comp.lang.python Subject: Re: Pass variable by reference Date: Thu, 08 May 2014 00:22:55 +0300 Organization: A noiseless patient Spider Lines: 31 Message-ID: <87ppjpwafk.fsf@elektro.pacujo.net> References: <235C4BFA-9770-481A-9FCF-21C3F036769C@gmail.com> <5368681D.8070602@islandtraining.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx05.eternal-september.org; posting-host="ff5cf27ef3d5b31f034d3b72bdc27a41"; logging-data="17335"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Kx4yeS0DQBwKBpM/8DNqj" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) Cancel-Lock: sha1:tTPQHUdbpm9uWehZZ4NiHo2ZuSE= sha1:+5Gq1OxejYcO3ElZTzDun7ozvv0= Xref: csiph.com comp.lang.python:71055 Mark H Harris : > A == B > True > > A is B > False > > [...] > > This is just one of a dozen 'different' kinds of examples. And the > answer is the same, Python does not have variables, Python has names > bound to objects. That is a different topic and isn't related to variables at all. Instead, you are talking about object identity: >>> 2 * 3000 == 6000 True >>> 2 * 3000 is 6000 False >>> "abc"[:1] == "a" True >>> "abc"[:1] is "a" False But hey, we can open another thread for whether Python has values or objects! Marko