many constructors in a class?

2013-08-14 Thread climb65
Hello, here is a small basic question : Is it possible to have more than one constructor (__init__ function) in a class? For instance, to create an object with 2 different ways? If my memory is good, I think that with C++ it is possible. Thanks for your answer. -- http://mail.python.org/mailm

hand made class with destructor and the logging module

2010-10-27 Thread climb65
Hello, I have a handmade class within a python program which uses the logging module. This class has a destructor which is expected to log something into my log file if a crash occurs. Well, the destructor works well but during the crash, python has already closed the log file and the reference