Skip to content

Commit 37e77d8

Browse files
committed
nit
1 parent 8492efa commit 37e77d8

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

Lib/datetime.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1282,7 +1282,7 @@ def __reduce__(self):
12821282
if getstate:
12831283
state = getstate()
12841284
else:
1285-
state = getattr(self, "__dict__", None) or None
1285+
state = getattr(self, "__dict__", None)
12861286
if state is None:
12871287
return (self.__class__, args)
12881288
else:
@@ -1761,13 +1761,6 @@ def _fromtimestamp(cls, t, utc, tz):
17611761
A timezone info object may be passed in as well.
17621762
"""
17631763

1764-
# f, a = math.modf(1651815892989527.7)
1765-
# print(f, a)
1766-
# 0.75 1651815892989527.0
1767-
# f = 0.7 -> 0.75 precision broken
1768-
1769-
# Decimal is a heavyweight module
1770-
17711764
t, dp = str(t).split('.')
17721765
us, sus = dp[:6], f'{dp[6:9]:0<3}'
17731766
t, us, sus = int(t), int(us), int(sus)
@@ -2633,8 +2626,7 @@ def _name_from_offset(delta):
26332626
# pretty bizarre, and a tzinfo subclass can override fromutc() if it is.
26342627

26352628
try:
2636-
# TODO: temp comment for testing
2637-
from _datetime2 import *
2629+
from _datetime import *
26382630
except ImportError:
26392631
pass
26402632
else:

0 commit comments

Comments
 (0)