I think you have to call type.__new__ like this: def __new__(cls, year, month, day, *args, **kw): print "new called" try: return _datetime.__new__(cls, year, month, day, *args, **kw) except ValueError: return type.__new__(cls, ...)
Are you sure you can specify arbitrary arguments to the __new__ method? I thought they had to be the class object, the tuple of bases, and the dictionary of names. -- http://mail.python.org/mailman/listinfo/python-list