Skip to content

Commit 2e91b92

Browse files
mkomondpgeorge
authored andcommitted
unix-ffi/datetime: Add tzinfo.__new__ to make the package importable.
Add constructor to tzinfo class so that the package can be imported without errors.
1 parent a3df207 commit 2e91b92

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

unix-ffi/datetime/datetime.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -958,6 +958,10 @@ class tzinfo:
958958

959959
__slots__ = ()
960960

961+
def __new__(self, *args, **kwargs):
962+
"""Constructor."""
963+
return object.__new__(self)
964+
961965
def tzname(self, dt):
962966
"datetime -> string name of time zone."
963967
raise NotImplementedError("tzinfo subclass must override tzname()")

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy