Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #32569

Re: Negative array indicies and slice()

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.019
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'problem?': 0.07; 'missed': 0.09; 'leaks': 0.09; 'subject:()': 0.09; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'slice.': 0.16; 'subject:array': 0.16; 'wrote:': 0.17; 'thu,': 0.17; 'memory': 0.18; 'received:209.85.214.174': 0.21; "i've": 0.23; 'allows': 0.25; 'header:In-Reply-To:1': 0.25; 'andrew': 0.27; 'forgive': 0.27; 'message-id:@mail.gmail.com': 0.27; 'this?': 0.28; 'container': 0.29; 'index,': 0.29; 'stuff': 0.30; 'like:': 0.33; 'retain': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'nov': 0.35; 'pm,': 0.35; 'received:209.85': 0.35; 'something': 0.35; 'but': 0.36; 'possible': 0.37; 'does': 0.37; 'received:209': 0.37; 'well.': 0.37; 'subject:: ': 0.38; 'object': 0.38; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'first': 0.61; '10:32': 0.84; 'abnormal': 0.84; 'seriously,': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=9d1HCLxxdCXXWry22mXOTkvqt+CLavxKb1X/6XZ2Kj0=; b=qC9EJ0mLv/yNGf6V4xjG1M/rXGwsKL4NAQlpiggHUNuX4eisTkcIcUFS+aGjIzIY5s /v3L6lGMvAIpek5GLMIRe10FCjd/S+jyOL/y61WpuKgXGjVlkUWnN4Bt5E3UeOK7U/Sm +zkaNEGW4hJJOsRHIyB0mdJwtC3NPc9avd9VMMGw/fl0OCAuRTFKWGghqRvqSOrtWoBR QTMcBjNFnrB41bZ/5GedJz1Q5bqA/HOhj/o8IlxdKvowOIvtGk4s6eVqfp+543jTeSkC vvhKgwrXQRg8VJAiE2XGNb9RxJXURbAzPPoStgnewg7VTy68fXcZ4KEwqosykwZDF+I/ ephw==
MIME-Version 1.0
In-Reply-To <50925DE6.7020100@r3dsolutions.com>
References <509053F2.6020900@r3dsolutions.com> <CALwzidnQ2bUdMp8c0xNomabcLHZBBtr_DYSSzvhz3jqeYNkWkQ@mail.gmail.com> <50912ADC.2020401@r3dsolutions.com> <CALwzid=_1TCQC5JryemVfVpBLWq=qZwy4hRjCPA5ha0vSm3=VA@mail.gmail.com> <50918716.3080305@r3dsolutions.com> <5092833F.4070609@stoneleaf.us> <50925DE6.7020100@r3dsolutions.com>
Date Fri, 2 Nov 2012 05:53:54 +1100
Subject Re: Negative array indicies and slice()
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
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 <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3162.1351796038.27098.python-list@python.org> (permalink)
Lines 15
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1351796038 news.xs4all.nl 6917 [2001:888:2000:d::a6]:56251
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:32569

Show key headers only | View raw


On Thu, Nov 1, 2012 at 10:32 PM, Andrew Robinson
<andrew3@r3dsolutions.com> wrote:
> presently slice() allows memory leaks through GC loops.

Forgive me if I've missed something here, but isn't it only possible
to make a refloop by decidedly abnormal behaviour? Stuff like:

a=[]; a.append(slice(a))

Seriously, who does this? First you have to have a reference to a
container in place of an index, and then you have to retain the slice
object inside that same container as well. Neither operation is normal
use of a slice. Where is the problem?

ChrisA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Negative array indicies and slice() Chris Angelico <rosuav@gmail.com> - 2012-11-02 05:53 +1100

csiph-web