Events: The Python Way
gianmaria at hotmail.com
Sun Jul 29 01:15:28 CEST 2007
i'm a .net programmer and i'm learnig python, so this question can be very
stupid or easy for python programmers. I've a doubt about events.... here is
in c# for example i can write a delegate and an event in this way...
public delegate SomethingChangedHandler(string message);
public event SomethingChangedHandler SomethingChanged;
and later in the code fire this event in this way...
if(SomethingChanged != null)
and the subscription of this event of other objects can be easy as
eventGeneratorObject.SomethingChanged += new
and even the handlig of the event is aesy...
void aFunctionto_takecareof_it(string msg)
....now the question is.. how can i do the same using Python? Every help is
More information about the Python-list