Michael Spencer wrote: > >>> class A(object): > ... > >>> b = object.__new__(A)
Note that you'll need to be a bit cleverer if the class might be derived from some other built-in type: >>> class A(list): ... pass ... >>> b = object.__new__(A) Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: object.__new__(A) is not safe, use list.__new__() >>> b = list.__new__(A) >>> b [] I'm not sure what is the easiest way to figure out what base class to use, though. One way would be to work your way backwards along the __mro__ until one of them succeeds, but there's probably a more direct way. -- Greg -- http://mail.python.org/mailman/listinfo/python-list