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!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.85.MISMATCH!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; 'compiler': 0.05; 'array.': 0.09; 'subject:()': 0.09; 'tuple': 0.09; '4:39': 0.16; 'breakpoint': 0.16; 'chris,': 0.16; 'oct': 0.16; 'stripped': 0.16; 'subject:array': 0.16; 'mon,': 0.16; 'wrote:': 0.17; 'code,': 0.18; '(by': 0.22; 'struct': 0.22; 'defined': 0.22; 'elements': 0.23; 'mention': 0.23; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; 'andrew': 0.27; 'run': 0.28; 'post': 0.28; 'tail': 0.29; 'code': 0.31; 'to:addr:python-list': 0.33; 'stores': 0.35; 'pm,': 0.35; 'but': 0.36; 'why': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'things': 0.38; 'to:addr:python.org': 0.39; 'received:phx3.secureserver.net': 0.62; 'received:prod.phx3.secureserver.net': 0.62; 'header:Reply-To:1': 0.68; 'reply-to:no real name:2**0': 0.72; 'lying': 0.84; 'mention.': 0.84; 'received:173.201': 0.91; 'received:173.201.192': 0.91 Date: Mon, 29 Oct 2012 17:17:07 -0700 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: Negative array indicies and slice() References: <6998a955-7b34-4f4f-b8d6-62d1028f7561@googlegroups.com> <4c024364-84df-403b-8b9e-4a4c8f06121c@googlegroups.com> <508e6649$0$29967$c3e8da3$5496439d@news.astraweb.com> <508E1BC9.3000308@r3dsolutions.com> <508EC428.5080808@r3dsolutions.com> <508F05AE.50607@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: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1351581543 news.xs4all.nl 6947 [2001:888:2000:d::a6]:49928 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:32472 On 10/29/2012 11:51 PM, Ian Kelly wrote: > On Mon, Oct 29, 2012 at 4:39 PM, Andrew Robinson > > As above, you're looking at the compiler code, which is why you're > finding things like "line" and "column". The tuple struct is defined > in tupleobject.h and stores tuple elements in a tail array. > If you re-check my post to chris, I listed the struct you mention. The C code is what is actually run (by GDB breakpoint test) when a tuple is instantiated. If the tuple were stripped of the extra data -- then it ought to be as small as slice(). But it's not as small -- so either the sys.getsizeof() is lying -- or the struct you mention is not complete. Which? --Andrew.