Re: Question about weakref

Discussion in 'Python' started by Ian Kelly, Jul 6, 2012.

  1. Ian Kelly

    Ian Kelly Guest

    On Fri, Jul 6, 2012 at 11:48 AM, Ian Kelly <> wrote:
    > def del_b(self, b):
    > for i, x in enumerate(self.array):
    > if b is x:
    > del self.array


    That should probably have an explicit break on the end:

    def del_b(self, b):
    for i, x in enumerate(self.array):
    if b is x:
    del self.array
    break
     
    Ian Kelly, Jul 6, 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. Frank Millman

    Question about weakref

    Frank Millman, Jul 4, 2012, in forum: Python
    Replies:
    0
    Views:
    190
    Frank Millman
    Jul 4, 2012
  2. Dieter Maurer

    Re: Question about weakref

    Dieter Maurer, Jul 5, 2012, in forum: Python
    Replies:
    0
    Views:
    200
    Dieter Maurer
    Jul 5, 2012
  3. Frank Millman

    Re: Question about weakref

    Frank Millman, Jul 5, 2012, in forum: Python
    Replies:
    0
    Views:
    168
    Frank Millman
    Jul 5, 2012
  4. Dieter Maurer

    Re: Question about weakref

    Dieter Maurer, Jul 5, 2012, in forum: Python
    Replies:
    0
    Views:
    183
    Dieter Maurer
    Jul 5, 2012
  5. Frank Millman

    Re: Question about weakref

    Frank Millman, Jul 6, 2012, in forum: Python
    Replies:
    0
    Views:
    172
    Frank Millman
    Jul 6, 2012
Loading...

Share This Page