Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Gregory Ewing Newsgroups: comp.lang.python Subject: Re: Explanation of list reference Date: Mon, 17 Feb 2014 11:40:57 +1300 Lines: 11 Message-ID: References: <13208de8-0f85-4e60-b059-dc087c8fda41@googlegroups.com> <917ede6d-db7c-4a8c-8203-27677283776b@googlegroups.com> <871tz5piy0.fsf@elektro.pacujo.net> <87vbwho1i0.fsf@elektro.pacujo.net> <87mwhtnzdu.fsf@elektro.pacujo.net> <52ff473b$0$29973$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net m5HPXR38XTalC+utPOCEjw4d5fSMQ3YzeGN5E3UrLZRwvxb79i Cancel-Lock: sha1:uFDjacFEKW0JfGvXVJQrGkx0Q5I= User-Agent: Mozilla Thunderbird 1.0.5 (Macintosh/20050711) X-Accept-Language: en-us, en In-Reply-To: <52ff473b$0$29973$c3e8da3$5496439d@news.astraweb.com> Xref: csiph.com comp.lang.python:66567 Steven D'Aprano wrote: > And indeed numpy arrays do share state. Why? No idea. Somebody thought > that it was a good idea. (Not me though...) Probably because they're often large and people don't want to incur the overhead of copying them any more than necessary. So slices are defined to return views rather than independent objects. -- Greg