Skip to content

Commit 2f4d35b

Browse files
committed
assign descriptors within the class
1 parent 27efa51 commit 2f4d35b

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

pandas/_libs/tslibs/timedeltas.pyx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1957,15 +1957,6 @@ class Timedelta(_Timedelta):
19571957
_req_any_kwargs_new = {"weeks", "days", "hours", "minutes", "seconds",
19581958
"milliseconds", "microseconds", "nanoseconds"}
19591959

1960-
min = MinMaxReso("min")
1961-
min.__doc__ = "Timedelta: The minimum representable value."
1962-
1963-
max = MinMaxReso("max")
1964-
max.__doc__ = "Timedelta: The maximum representable value."
1965-
1966-
resolution = MinMaxReso("resolution")
1967-
resolution.__doc__ = "Timedelta: The smallest representable increment."
1968-
19691960
def __new__(cls, object value=_no_input, unit=None, **kwargs):
19701961
if value is _no_input:
19711962
if not len(kwargs):
@@ -2110,6 +2101,10 @@ class Timedelta(_Timedelta):
21102101

21112102
return _timedelta_from_value_and_reso(cls, value, NPY_FR_ns)
21122103

2104+
min = MinMaxReso("min")
2105+
max = MinMaxReso("max")
2106+
resolution = MinMaxReso("resolution")
2107+
21132108
def __setstate__(self, state):
21142109
if len(state) == 1:
21152110
# older pickle, only supported nanosecond

0 commit comments

Comments
 (0)