--
https://mail.python.org/mailman/listinfo/python-list
On Tue, Apr 12, 2016 at 9:10 AM, Steven D'Aprano wrote:
> Hence "self.things" will return the same
> list each time, the one defined as a class attribute, regardless of
> which "self" does the lookup.
>
> If a method were to assign to the attribute, for example "self.things = []",
> that would cre
>>
>> class Thing:
>> things = []
>> def __init__(self):
>> self.things.append(self)
>> def __del__(self):
>> # Remove me when I'm dead
>> self.things.remove(self)
>>
>> This ingenious technique gua
__del__(self):
# Remove me when I'm dead
self.things.remove(self)
This ingenious technique guarantees that you never have dead objects
in your list, by having each object remove itself when it dies.
ChrisA
I'm not quite sure how tongue in cheek ChrisA's reply and t
On Sunday 10 April 2016 13:46, fan nie wrote:
>
We cannot remove you. You subscribed, you have to unsubscribe yourself.
If you look at the footer of this email, right at the bottom, it should have
instructions for unsubscribing.
Otherwise, go here:
https://mail.python.org/mailman/listinfo/py
fan nie writes:
> [no content]
Thank you for sending a message to everyone on the mailing list, with
the full correct information on how to check subscription settings and
how to unsubscribe.
As you are no doubt aware, since you left the message body entirely
blank to draw attention to this, th
On Sun, Apr 10, 2016 at 1:46 PM, fan nie wrote:
>
> --
> https://mail.python.org/mailman/listinfo/python-list
Sure. I presume you mean something like this:
class Thing:
things = []
def __init__(self):
self.things.append(self)
def __del__(self):
# Remove me
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, May 4, 2008 at 2:48 PM, Vladimir Kropylev <[EMAIL PROTECTED]> wrote:
> please remove me from this list, thanks
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Follow that link (http://mail.python.org/mailman/listinfo/python-list)
and see the "
please remove me from this list, thanks
--
http://mail.python.org/mailman/listinfo/python-list
10 matches
Mail list logo