Re: asyncore question

2005-11-23 Thread snoe
Not 100% sure why print d gives None but if you need to print something that represents the instance, use repr d.__str__ method-wrapper object at 0x0098C450 str(d) 'None' repr(d) 'asyncore.dispatcher at 0x8d5be8' print repr(d) asyncore.dispatcher at 0x8d5be8 Why isn't __str__ in dir?

Re: asyncore question

2005-11-23 Thread Steve Holden
Stéphane Ninin wrote: Hello, Probably a stupid question... but still: from asyncore import dispatcher d=dispatcher() print d None d asyncore.dispatcher at 0x8d9080 print type(d) type 'instance' d.__class__ class asyncore.dispatcher at 0x008DF150 d is None False

Re: asyncore question

2005-11-23 Thread Fredrik Lundh
Stéphane Ninin wrote: from asyncore import dispatcher d=dispatcher() print d None d asyncore.dispatcher at 0x8d9080 print type(d) type 'instance' d.__class__ class asyncore.dispatcher at 0x008DF150 d is None False ^Z why print d prints None ? it's a tricky one: the