Skip to content

Commit 945527d

Browse files
rchen152matthiaskramm
authored andcommitted
Add a __new__ method to datetime.datetime. (#1417)
1 parent 4a8a20f commit 945527d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

stdlib/2/datetime.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ class datetime(object):
143143
def __init__(self, year: int, month: int, day: int, hour: int = ...,
144144
minute: int = ..., second: int = ..., microseconds: int = ...,
145145
tzinfo: tzinfo = ...) -> None: ...
146+
def __new__(cls, year: int, month: int, day: int, hour: int = ...,
147+
minute: int = ..., second: int = ..., microseconds: int = ...,
148+
tzinfo: tzinfo = ...) -> datetime: ...
146149

147150
@property
148151
def year(self) -> int: ...

0 commit comments

Comments
 (0)