In article <[EMAIL PROTECTED]>, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > >I accept my question about classes being singletons is not well-formed, >not even in my own mind. I guess one way of asking is, for any two class >objects (not instances) C1 and C2, does "C1 == C2" imply "C1 is C2"?
Even that stricture fails under the presence of metaclasses. ;-) But answering your real question, I don't remember off-hand the required sequence, but it is possible to import a class two different ways such that the classes are not the object. This can cause problems with e.g. pickle. Within a single module, given a class defined only once within that module, the class will be a singleton. -- Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/ "All problems in computer science can be solved by another level of indirection." --Butler Lampson -- http://mail.python.org/mailman/listinfo/python-list