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!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'interpreter': 0.04; 'debugging': 0.05; 'garbage': 0.09; 'subject:()': 0.09; 'tuple': 0.09; 'breakpoint': 0.16; 'chris,': 0.16; 'oct': 0.16; 'script?': 0.16; 'stripped': 0.16; 'subject:array': 0.16; 'mon,': 0.16; 'wrote:': 0.17; 'bytes': 0.17; 'compilation': 0.17; '(by': 0.22; 'struct': 0.22; 'mention': 0.23; 'header:In-Reply-To:1': 0.25; 'andrew': 0.27; 'message-id:@mail.gmail.com': 0.27; 'run': 0.28; 'post': 0.28; 'code': 0.31; 'running': 0.32; 'to:addr:python- list': 0.33; 'received:google.com': 0.34; 'pm,': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'does': 0.37; 'received:209': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'step': 0.39; 'header:Received:5': 0.40; 'lying': 0.84; 'mention.': 0.84; 'precompiled': 0.84; 'to:name:python': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=OTVoE7GLOqXb6uWB/Zk1YDlqA+YDJ7gykdA9SiECFB0=; b=ZMeSO8yc8PVuWfK7o0Ua8A65m4AHkh7p3VLFIhOIwmniJgp/wNBIqhBd6RVi0xH6e5 lm7p5W63xMEeyOXUvLLMkCxohjk45Mk5jAv4DngziPHfINi7yMr7GHCGsxnROr8CbWUu A9G2ECKDsGwrpJEMNHw+P+IRDcXzDwy6hmqr+XXG1lBr8t79rIuQ4QyP3lBaSXZJtf5K 34wr8YNiKs1Mgq8Dtfbx1O35mFRPrfQixv4tJYu6hPewLR6bCvcgpjpfdBtszD92m2rd QsCUO40E5CLuokO3w92b2tbFiHACVyOtetVw5ZhjofOzaD6BYoz6WmI8J5SWH9PI94E/ 1j8g== MIME-Version: 1.0 In-Reply-To: <508F1C83.1080606@r3dsolutions.com> 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> <508F1C83.1080606@r3dsolutions.com> From: Ian Kelly Date: Tue, 30 Oct 2012 01:32:44 -0600 Subject: Re: Negative array indicies and slice() To: Python Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list 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: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1351582397 news.xs4all.nl 6918 [2001:888:2000:d::a6]:55533 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:32474 On Mon, Oct 29, 2012 at 6:17 PM, Andrew Robinson wrote: > 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. When you were running GDB, were you debugging the interactive interpreter or a precompiled script? The interactive interpreter does a compilation step for every line entered. > 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. As just explained, the extra 16 bytes are added by the garbage collector.