Re: Negative array indicies and slice()

Discussion in 'Python' started by Chris Angelico, Nov 1, 2012.

  1. On Thu, Nov 1, 2012 at 10:32 PM, Andrew Robinson
    <> 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
    Chris Angelico, Nov 1, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    72
    Views:
    766
    88888 Dihedral
    Nov 2, 2012
  2. Andrew Robinson

    Re: Negative array indicies and slice()

    Andrew Robinson, Oct 29, 2012, in forum: Python
    Replies:
    0
    Views:
    122
    Andrew Robinson
    Oct 29, 2012
  3. Mark Lawrence

    Re: Negative array indicies and slice()

    Mark Lawrence, Oct 29, 2012, in forum: Python
    Replies:
    0
    Views:
    154
    Mark Lawrence
    Oct 29, 2012
  4. Ethan Furman

    Re: Negative array indicies and slice()

    Ethan Furman, Oct 30, 2012, in forum: Python
    Replies:
    0
    Views:
    154
    Ethan Furman
    Oct 30, 2012
  5. Dennis Lee Bieber

    Re: Negative array indicies and slice()

    Dennis Lee Bieber, Oct 31, 2012, in forum: Python
    Replies:
    0
    Views:
    146
    Dennis Lee Bieber
    Oct 31, 2012
Loading...

Share This Page