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


Groups > comp.lang.python > #24981 > unrolled thread

Re: Question about weakref

Started byIan Kelly <ian.g.kelly@gmail.com>
First post2012-07-06 11:51 -0600
Last post2012-07-06 11:51 -0600
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Question about weakref Ian Kelly <ian.g.kelly@gmail.com> - 2012-07-06 11:51 -0600

#24981 — Re: Question about weakref

FromIan Kelly <ian.g.kelly@gmail.com>
Date2012-07-06 11:51 -0600
SubjectRe: Question about weakref
Message-ID<mailman.1867.1341597125.4697.python-list@python.org>
On Fri, Jul 6, 2012 at 11:48 AM, Ian Kelly <ian.g.kelly@gmail.com> wrote:
>     def del_b(self, b):
>         for i, x in enumerate(self.array):
>             if b is x:
>                 del self.array[i]

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[i]
                break

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web