Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.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.031 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'memory.': 0.05; 'python': 0.09; '1000.': 0.09; 'rounding': 0.09; 'sub': 0.09; ';-)': 0.11; 'thread': 0.11; 'do,': 0.15; '*any*': 0.16; 'wrote:': 0.17; "shouldn't": 0.17; '>>>': 0.18; 'changes': 0.20; 'minor': 0.22; 'subject:skip:i 10': 0.22; 'least': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'am,': 0.27; 'andrew': 0.27; 'subject:list': 0.28; 'consistency': 0.29; 'surprised': 0.29; 'unlikely': 0.29; 'objects': 0.29; "i'm": 0.29; 'lists': 0.31; 'morning': 0.32; 'to:addr:python-list': 0.33; 'lists.': 0.35; 'nov': 0.35; 'so,': 0.35; 'optimization': 0.37; 'far': 0.37; 'well.': 0.37; 'subject:: ': 0.38; 'easier': 0.38; 'object': 0.38; 'nothing': 0.38; 'sure': 0.38; 'to:addr:python.org': 0.39; 'where': 0.40; 'subject:-': 0.40; 'received:network': 0.61; 'received:phx3.secureserver.net': 0.62; 'received:prod.phx3.secureserver.net': 0.62; 'received:unknown': 0.63; 'more': 0.63; 'header:Reply-To:1': 0.68; 'reply-to:no real name:2**0': 0.72; 'actually,': 0.84; 'psychology': 0.84; 'received:173.201': 0.91; 'received:173.201.192': 0.91 Date: Tue, 06 Nov 2012 13:19:51 -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> <5098A55C.3090201@r3dsolutions.com> <5098C873.2000200@r3dsolutions.com> <5B80DD153D7D744689F57F4FB69AF4741678180D@SCACMX008.exchad.jpmchase.net> In-Reply-To: <5B80DD153D7D744689F57F4FB69AF4741678180D@SCACMX008.exchad.jpmchase.net> 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: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1352237153 news.xs4all.nl 6856 [2001:888:2000:d::a6]:57813 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:32843 On 11/06/2012 09:32 AM, Prasad, Ramit wrote: > Ian Kelly wrote: >> On Tue, Nov 6, 2012 at 1:21 AM, Andrew Robinson >> > [snip] >>> See if you can find *any* python program where people desired the >>> multiplication to have the die effect that changing an object in one of the >>> sub lists -- changes all the objects in the other sub lists. >>> >>> I'm sure you're not going to find it -- and even if you do, it's going to be >>> 1 program in 1000's. >> Per the last thread where we discussed extremely rare scenarios, >> shouldn't you be rounding "1 in 1000s" up to 20%? ;-) :D -- Ian -- also consider that I *am* willing to use extra memory. Not everything can be shrunk to nothing and still remain functional. :) So, it isn't *all* about *micro* optimization -- it's also about psychology and flexibility. > Actually, I would be surprised if it was even 1 in 1000. > Of course, consistency makes it easier to learn and *remember*. > I value that far more than a minor quirk that is unlikely to > bother me now that I know of it. Well, at least not as long as > I do not forget my morning coffee/tea :) But, having it copy lists -- when the only purpose of multiplication is for lists; is only a minor quirk as well. > > > ~Ramit