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


Groups > comp.lang.python > #32569

Re: Negative array indicies and slice()

References (2 earlier) <50912ADC.2020401@r3dsolutions.com> <CALwzid=_1TCQC5JryemVfVpBLWq=qZwy4hRjCPA5ha0vSm3=VA@mail.gmail.com> <50918716.3080305@r3dsolutions.com> <5092833F.4070609@stoneleaf.us> <50925DE6.7020100@r3dsolutions.com>
Date 2012-11-02 05:53 +1100
Subject Re: Negative array indicies and slice()
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.3162.1351796038.27098.python-list@python.org> (permalink)

Show all headers | 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