diff options
Diffstat (limited to 'Lib/_pydatetime.py')
| -rw-r--r-- | Lib/_pydatetime.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/_pydatetime.py b/Lib/_pydatetime.py index bca2acf..3551453 100644 --- a/Lib/_pydatetime.py +++ b/Lib/_pydatetime.py @@ -2347,6 +2347,9 @@ class timezone(tzinfo): "timedelta(hours=24).") return cls._create(offset, name) + def __init_subclass__(cls): + raise TypeError("type 'datetime.timezone' is not an acceptable base type") + @classmethod def _create(cls, offset, name=None): self = tzinfo.__new__(cls) |
