MCPcopy Index your code
hub / github.com/RustPython/RustPython / combine

Method combine

Lib/_pydatetime.py:1905–1915  ·  view source on GitHub ↗

Construct a datetime from a given date and a given time.

(cls, date, time, tzinfo=True)

Source from the content-addressed store, hash-verified

1903
1904 @classmethod
1905 def combine(cls, date, time, tzinfo=True):
1906 "Construct a datetime from a given date and a given time."
1907 if not isinstance(date, _date_class):
1908 raise TypeError("date argument must be a date instance")
1909 if not isinstance(time, _time_class):
1910 raise TypeError("time argument must be a time instance")
1911 if tzinfo is True:
1912 tzinfo = time.tzinfo
1913 return cls(date.year, date.month, date.day,
1914 time.hour, time.minute, time.second, time.microsecond,
1915 tzinfo, fold=time.fold)
1916
1917 @classmethod
1918 def fromisoformat(cls, date_string):

Callers 7

__add__Method · 0.45
test_combineMethod · 0.45
promoted_nestedMethod · 0.45
into_errorMethod · 0.45

Calls 2

isinstanceFunction · 0.85
clsClass · 0.50