Erik Max Francis <[EMAIL PROTECTED]> writes: > You can, but a class factory is going to be much clearer and probably > more maintainable. From the user's perspective, there's no difference > from calling a class A to instantiate it, and calling a factory > function called A that selects the appropriate class and returns an > instance of it.
I remember having a similar problem involving multiple base classes and deciding that factory functions couldn't do quite what I wanted. Here's a thread about it, with a recipe using metaclasses by Roeland Rengelink: http://tinyurl.com/rz6ne Unfortunately, the subtleties of what I was trying to do now escape me. -- http://mail.python.org/mailman/listinfo/python-list