Negative array indicies and slice()

Chris Angelico rosuav at
Thu Nov 1 19:53:54 CET 2012

On Thu, Nov 1, 2012 at 10:32 PM, Andrew Robinson
<andrew3 at> 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?


More information about the Python-list mailing list