File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -1738,7 +1738,11 @@ def second(self):
1738
1738
This contains seconds and nanoseconds of the time.
1739
1739
`int(:attr:`.seconds`)` will yield the seconds without nanoseconds.
1740
1740
1741
- :type: float
1741
+ :type: decimal.Decimal
1742
+
1743
+ .. versionchanged:: 4.4
1744
+ Property's type changed from :class:`float` to
1745
+ :class:`decimal.Decimal` to mitigate rounding issues.
1742
1746
"""
1743
1747
# TODO 5.0: return plain self.__second
1744
1748
with _decimal_context (prec = 11 ):
@@ -1762,7 +1766,12 @@ def hour_minute_second(self):
1762
1766
Will be removed in 5.0.
1763
1767
Use :attr:`.hour_minute_second_nanosecond` instead.
1764
1768
1765
- :type: (int, int, float)"""
1769
+ :type: (int, int, decimal.Decimal)
1770
+
1771
+ .. versionchanged:: 4.4
1772
+ Last element of the property changed from :class:`float` to
1773
+ :class:`decimal.Decimal` to mitigate rounding issues.
1774
+ """
1766
1775
return self .__hour , self .__minute , self .second
1767
1776
1768
1777
@property
You can’t perform that action at this time.
0 commit comments