Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Antoon Pardon Newsgroups: comp.lang.python Subject: Re: I'm wrong or Will we fix the ducks limp? Date: Thu, 9 Jun 2016 14:35:29 +0200 Lines: 35 Message-ID: References: <1465186088.3554819.628831041.19D0DC8D@webmail.messagingengine.com> <575599f4$0$1595$c3e8da3$5496439d@news.astraweb.com> <57569f6a$0$11124$c3e8da3@news.astraweb.com> <5756BED8.2000304@rece.vub.ac.be> <1465313620.1380508.630546953.7F7E755D@webmail.messagingengine.com> <5757CF15.4010002@rece.vub.ac.be> <5757dbaf$0$1615$c3e8da3$5496439d@news.astraweb.com> <5757E840.80805@rece.vub.ac.be> <5757FB1B.5000502@rece.vub.ac.be> <5758292E.2020600@rece.vub.ac.be> <871t474ox1.fsf@elektro.pacujo.net> <57591B21.7050509@rece.vub.ac.be> <1mokwuv.1rvlipllo6ji2N%lists@juliensalort.org> <57596291.2090705@rece.vub.ac.be> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de NuBP/Mvn5oHP20aKxdNs+wuvwOpNPp3qMWHaPhUPL4Sw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'received:134': 0.05; 'behave': 0.09; 'pointers': 0.09; 'variables,': 0.09; 'python': 0.10; 'ignore': 0.14; 'variables': 0.15; 'instead:': 0.16; 'received:ac.be': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'structs': 0.16; 'wrote:': 0.16; 'pointer': 0.18; 'variable': 0.18; 'variables.': 0.22; 'written': 0.24; 'header:In- Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'received:be': 0.30; 'but': 0.36; 'too': 0.36; 'there': 0.36; 'to:addr:python- list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'subject:the': 0.39; 'enough': 0.39; 'to:addr:python.org': 0.40; 'still': 0.40; 'your': 0.60; 'show': 0.62; 'between': 0.65; 'backs': 0.84; 'conclude': 0.84; 'pardon': 0.84; 'schreef': 0.84 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArQIAHYeUleGuA9G/2dsb2JhbABehFsBMbxfhhICggABAQEBAQFmhG0BAQQjBFERCxgCAgUWCwICCQMCAQIBRRMGAgKIK7FNjT6DWwEBCAIlgQGFJoRNhQyCNYJZAQSYRYFXhySFKYkzhWmPUlSDcGwBihEBAQE User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.8.0 In-Reply-To: <1mokwuv.1rvlipllo6ji2N%lists@juliensalort.org> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <57596291.2090705@rece.vub.ac.be> X-Mailman-Original-References: <1465186088.3554819.628831041.19D0DC8D@webmail.messagingengine.com> <575599f4$0$1595$c3e8da3$5496439d@news.astraweb.com> <57569f6a$0$11124$c3e8da3@news.astraweb.com> <5756BED8.2000304@rece.vub.ac.be> <1465313620.1380508.630546953.7F7E755D@webmail.messagingengine.com> <5757CF15.4010002@rece.vub.ac.be> <5757dbaf$0$1615$c3e8da3$5496439d@news.astraweb.com> <5757E840.80805@rece.vub.ac.be> <5757FB1B.5000502@rece.vub.ac.be> <5758292E.2020600@rece.vub.ac.be> <871t474ox1.fsf@elektro.pacujo.net> <57591B21.7050509@rece.vub.ac.be> <1mokwuv.1rvlipllo6ji2N%lists@juliensalort.org> Xref: csiph.com comp.lang.python:109736 Op 09-06-16 om 13:46 schreef Julien Salort: > Antoon Pardon wrote: > >> A.x = 1; >> A.y = 2; >> >> B = A; >> >> B.x = 3; >> B.y = 4; >> >> >> In C the variable A will still be x:1, y:2. >> In Python the variable A will be x:3, y:4. > But it would, if you had written instead: > > A->x = 1; > A->y = 2; > > B = A; > > B->x = 3; > B->y = 4; > > which backs indeed the C pointer analogy... Yes, what is your point? I know there is a C pointer analogy with Python variables. The fact that there is an analogy between C pointers and Python variables, is not enough to conclude that C variables and Python variables behave exactly the same. Normal structs are a kind of variable too in C. If you have to ignore those in order to show similarities, then the variables in general don't behave exactly the same.