def Time_or_None(s):
try:
h, m, s = s.split(':')
h, m, s = int(h), int(m), float(s)
return time(hour=h, minute=m, second=int(s),
microsecond=int(math.modf(s)[0] * 1000000))
except ValueError:
return None
times.py 文件源码
python
阅读 36
收藏 0
点赞 0
评论 0
评论列表
文章目录