On Jul 29, 3:14 pm, "Gianmaria" <[EMAIL PROTECTED]> wrote:
> "David Wilson" <[EMAIL PROTECTED]> ha scritto nel messaggionews:[EMAIL
> PROTECTED]
>
>
>
> > Hi there,
>
> > Python has no built-in way of doing this. You may consider writing
> > your own class if you like this pattern (I personally do
"David Wilson" <[EMAIL PROTECTED]> ha scritto nel messaggio
news:[EMAIL PROTECTED]
> Hi there,
>
> Python has no built-in way of doing this. You may consider writing
> your own class if you like this pattern (I personally do):
>
> class Event(object):
>def __init__(self):
>self.subscri
On 2007-07-29, at 02:34, David Wilson wrote:
> Hi there,
>
> Python has no built-in way of doing this. You may consider writing
> your own class if you like this pattern (I personally do):
>
> class Event(object):
> def __init__(self):
> self.subscribers = set()
...
> def __isub
Hi there,
Python has no built-in way of doing this. You may consider writing
your own class if you like this pattern (I personally do):
class Event(object):
def __init__(self):
self.subscribers = set()
def __iadd__(self, subscriber):
self.subscribers.add(subscriber)