Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Random832 Newsgroups: comp.lang.python Subject: Re: I'm wrong or Will we fix the ducks limp? Date: Mon, 06 Jun 2016 12:57:28 -0400 Lines: 23 Message-ID: References: <87mvn22veg.fsf@rudin.co.uk> <13108bea-6750-443b-bee8-0532aba8b338@googlegroups.com> <5753c89b$0$1616$c3e8da3$5496439d@news.astraweb.com> <1465148542.2670061.628500777.62F1EFE1@webmail.messagingengine.com> <5754f36b$0$1619$c3e8da3$5496439d@news.astraweb.com> <5755a2a5$0$1611$c3e8da3$5496439d@news.astraweb.com> <1465232248.1109132.629464689.31293D92@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de vbCOG1e9a3NAacbOJ+LQHgiScNoXH+rM6thrEbgKmuOA== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'static': 0.03; 'compiler': 0.05; 'cpython': 0.05; '(using': 0.07; 'attributes': 0.07; 'dynamically': 0.07; 'exist.': 0.09; 'received:internal': 0.09; 'stack,': 0.09; 'python': 0.10; 'assume': 0.11; 'stack': 0.13; 'applies': 0.15; 'variables': 0.15; '"some': 0.16; 'fond': 0.16; 'message-id:@webmail.messagingengine.com': 0.16; 'offsets': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:io': 0.16; 'received:messagingengine.com': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'memory': 0.17; 'do.': 0.22; 'meant': 0.22; 'keys': 0.22; 'variables.': 0.22; 'header:In-Reply-To:1': 0.24; 'mon,': 0.24; "doesn't": 0.26; 'allocated': 0.27; 'locations': 0.27; 'values': 0.28; 'dictionary': 0.29; 'objects': 0.29; 'fixed': 0.31; 'point': 0.33; 'usually': 0.33; "d'aprano": 0.33; 'steven': 0.33; 'languages': 0.34; 'list': 0.34; 'knowledge': 0.35; 'but': 0.36; 'too': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'being': 0.37; '(2)': 0.37; 'received:66': 0.38; 'does': 0.39; 'subject:the': 0.39; 'rather': 0.39; 'to:addr:python.org': 0.40; 'where': 0.40; 'space': 0.40; 'header:Message-Id:1': 0.61; "they're": 0.66; 'here': 0.66; 'boxes.': 0.84; 'metaphor': 0.84 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=EnqypA8YvaRSVfXtm9q80f5aiH4=; b=iqQ9UJ JAAan6sB++GYX0Ah8ddl3P57fbTfyAc3EJUNfJiHe9DuCcNRAXq2/oXqw1v21krB AiyFOQW5X9RSYrspzRokkD1sJf1ror77pHlEYQnXmv0QtJ1CnVlCQeobtOH9O0ww c75L8Wgjv2fRE3y/Mb3auwekvyscE97yzhb5E= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=EnqypA8YvaRSVfX tm9q80f5aiH4=; b=QZOsa+ApuxwI6vFZcoAp4si9vj6Zr9fKbRigO3w2ZaKlGcl skd3zg4OU4DORVHIEMHr4aAjrVN1Jr8/p/fkc6mF+EVSxzXZEMu8Ed/2bDvJllyH 0NSxO1W+xsfaT5K+SqARxYh71orK8eBDqVCZvUwl+F9TB2RWqOndUR8cLSLc= X-Sasl-Enc: Y5pC0Y9eT2I1H1J/Y6bIgT8jzmVQyjTXtPnj3FH6TYLW 1465232248 X-Mailer: MessagingEngine.com Webmail Interface - ajax-7f2506ab In-Reply-To: <5755a2a5$0$1611$c3e8da3$5496439d@news.astraweb.com> 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: <1465232248.1109132.629464689.31293D92@webmail.messagingengine.com> X-Mailman-Original-References: <87mvn22veg.fsf@rudin.co.uk> <13108bea-6750-443b-bee8-0532aba8b338@googlegroups.com> <5753c89b$0$1616$c3e8da3$5496439d@news.astraweb.com> <1465148542.2670061.628500777.62F1EFE1@webmail.messagingengine.com> <5754f36b$0$1619$c3e8da3$5496439d@news.astraweb.com> <5755a2a5$0$1611$c3e8da3$5496439d@news.astraweb.com> Xref: csiph.com comp.lang.python:109582 On Mon, Jun 6, 2016, at 12:19, Steven D'Aprano wrote: > (2) The "variables are like boxes" metaphor applies to static languages > like > C and Pascal, where the compiler has knowledge of what variables will > exist. Such languages allocate space for the variables at compile time, > usually using fixed memory locations on the stack, or in registers, but > rarely dynamically in the heap. As you're so fond of pointing out, those are implementation details. And CPython does it too (using frame objects rather than the stack, but the relevant point here is that it *does* have knowledge of what variables will exist), for local variables. > That's exactly what Python doesn't do. And anyway, the fact that the "boxes" are dynamically allocated rather than "fixed memory locations on the stack"* doesn't stop them from being boxes (if you prefer Marko's analogy, "Some puppies hold leashes in their mouths"). Attributes and list items and dictionary keys and values are also boxes. *isn't the whole point of it being a stack that they're not fixed? I assume you meant fixed offsets from the stack frame.