Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.018 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'exception': 0.03; 'explicitly': 0.04; 'objects,': 0.07; 'python': 0.09; '*value*': 0.09; 'strategies.': 0.09; 'programmer': 0.11; 'thread': 0.11; 'suggest': 0.11; 'passing': 0.15; 'apology': 0.16; 'describing': 0.16; 'distinction': 0.16; 'made,': 0.16; 'wed,': 0.16; 'wrote:': 0.17; 'basically': 0.17; 'copied': 0.17; 'variables': 0.17; 'variable': 0.20; 'parameters': 0.20; 'subject:skip:i 10': 0.22; 'seems': 0.23; 'allows': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'andrew': 0.27; 'then.': 0.27; 'subject:list': 0.28; 'post': 0.28; 'statements': 0.29; 'objects': 0.29; 'words': 0.29; 'evaluation': 0.30; 'lists': 0.31; 'point': 0.31; 'to:addr:python-list': 0.33; 'point.': 0.33; 'list': 0.35; 'nov': 0.35; 'pm,': 0.35; "won't": 0.35; 'but': 0.36; "wasn't": 0.36; 'should': 0.36; 'does': 0.37; 'passed': 0.37; 'subject:: ': 0.38; 'object': 0.38; 'to:addr:python.org': 0.39; 'skip:" 10': 0.40; 'subject:-': 0.40; 'think': 0.40; 'your': 0.60; 'address': 0.60; 'link': 0.60; 'you.': 0.61; 'first': 0.61; 'received:network': 0.61; 'kind': 0.61; 'back': 0.62; 'received:phx3.secureserver.net': 0.62; 'received:prod.phx3.secureserver.net': 0.62; 'between': 0.63; 'received:unknown': 0.63; 'skip:n 10': 0.63; 'book.': 0.65; 'header:Reply-To:1': 0.68; 'reply-to:no real name:2**0': 0.72; 'interesting,': 0.84; 'received:173.201': 0.91; 'received:173.201.192': 0.91; 'thesis': 0.93 Date: Wed, 07 Nov 2012 16:24:22 -0800 From: Andrew Robinson User-Agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111126 Thunderbird/8.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Multi-dimensional list initialization References: <50978323$0$6908$e4fe514c@news2.news.xs4all.nl> <5098d2ac$0$29980$c3e8da3$5496439d@news.astraweb.com> <50999214.50100@r3dsolutions.com> <509ABBD4.7020200@r3dsolutions.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: andrew3@r3dsolutions.com List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 38 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1352334232 news.xs4all.nl 6928 [2001:888:2000:d::a6]:56526 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:32925 On 11/07/2012 01:01 PM, Ian Kelly wrote: > On Wed, Nov 7, 2012 at 12:51 PM, Andrew Robinson > wrote: >> Interesting, you avoided the main point "lists are copied with list >> multiplication". > It seems that each post is longer than the last. If we each responded > to every point made, this thread would fill a book. It already is :) > > Anyway, your point was to suggest that people would not be confused by > having list multiplication copy lists but not other objects, because > passing lists into functions as parameters works in basically the same > way. Not quite; Although I wasn't clear; The variable passed in is by *value* in contradistinction to the list which is by reference. Python does NOT always default copy by reference *when it could*; that's the point. Hence the programmer has to remember in foo( x,y ), the names x and y when assigned to -- *DONT* affect the variables from which they came. But any object internals do affect the objects everywhere. A single exception exists; My thesis is for a single exception as well -- I think Python allows that kind of thinking. > So actually I did address > this point with the "call-by-object" tangent; I just did not > explicitly link it back to your thesis. My apology for not proof reading my statements for clarity. It was definitely time for a nap back then. > Potayto, potahto. The distinction that you're describing is between > "strict" versus "non-strict" evaluation strategies. Hinging the > distinction on the non-descriptive words "call" and "pass" is lazy > terminology that should never have been introduced in the first place. I would do it again. Other's have already begun to discuss terminology with you -- I won't double team you.