Hi, I want to sub-class the datetime.timezone class, but when I derive from datetime.timezone I get an error message "TypeError: type 'datetime.timezone' is not an acceptable base type".
Why do I get this error? Is there something specific to do to avoid it? Below is an example of code: Python 3.2.2 (default, Sep 4 2011, 09:51:08) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import datetime >>> datetime.timezone <class 'datetime.timezone'> >>> class Utc(datetime.timezone): ... pass ... Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: type 'datetime.timezone' is not an acceptable base type Baptiste.
-- http://mail.python.org/mailman/listinfo/python-list