Python 3.7.3中文文档 双击 文档python-3.7.3-docs-html/index.html查看
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-04-09 01:09 python-3.7.3-docs-html
文件 55478 2019-04-09 01:09 python-3.7.3-docs-htmlgenindex-T.html
目录 0 2019-02-14 13:30 python-3.7.3-docs-html\_downloads
目录 0 2019-02-14 13:30 python-3.7.3-docs-html\_downloadsa01ac1c40eb86ec0f9e3c8e80f9eca65
文件 5860 2019-02-14 13:27 python-3.7.3-docs-html\_downloadsa01ac1c40eb86ec0f9e3c8e80f9eca65 zinfo_examples.py
文件 10648 2019-04-09 01:09 python-3.7.3-docs-htmlgenindex-Q.html
文件 107837 2019-04-09 01:09 python-3.7.3-docs-htmlobjects.inv
目录 0 2019-02-14 13:29 python-3.7.3-docs-htmlhowto
文件 146103 2019-04-09 01:01 python-3.7.3-docs-htmlhowto
egex.html
文件 300840 2019-04-09 01:01 python-3.7.3-docs-htmlhowtologging-cookbook.html
文件 108541 2019-04-09 01:01 python-3.7.3-docs-htmlhowtologging.html
文件 32483 2019-04-09 01:01 python-3.7.3-docs-htmlhowtoinstrumentation.html
文件 59324 2019-04-09 01:01 python-3.7.3-docs-htmlhowtocurses.html
文件 76009 2019-04-09 01:01 python-3.7.3-docs-htmlhowtounicode.html
文件 81527 2019-04-09 01:01 python-3.7.3-docs-htmlhowtoargparse.html
文件 9251 2019-04-09 01:01 python-3.7.3-docs-htmlhowtoindex.html
文件 47213 2019-04-09 01:01 python-3.7.3-docs-htmlhowtopyporting.html
文件 60129 2019-04-09 01:01 python-3.7.3-docs-htmlhowtodescriptor.html
文件 37660 2019-04-09 01:01 python-3.7.3-docs-htmlhowtoipaddress.html
文件 154516 2019-04-09 01:01 python-3.7.3-docs-htmlhowtofunctional.html
文件 40176 2019-04-09 01:01 python-3.7.3-docs-htmlhowtosockets.html
文件 72427 2019-04-09 01:01 python-3.7.3-docs-htmlhowtourllib2.html
文件 42143 2019-04-09 01:01 python-3.7.3-docs-htmlhowtocporting.html
文件 47225 2019-04-09 01:01 python-3.7.3-docs-htmlhowtosorting.html
文件 131757 2019-04-09 01:01 python-3.7.3-docs-htmlhowtoclinic.html
文件 577337 2019-04-09 01:00 python-3.7.3-docs-htmlcontents.html
目录 0 2019-02-14 13:29 python-3.7.3-docs-htmlfaq
文件 59828 2019-04-09 01:01 python-3.7.3-docs-htmlfaqextending.html
文件 208717 2019-04-09 01:01 python-3.7.3-docs-htmlfaqprogramming.html
文件 29135 2019-04-09 01:01 python-3.7.3-docs-htmlfaqwindows.html
文件 8242 2019-04-09 01:01 python-3.7.3-docs-htmlfaqindex.html
............此处省略1033个文件信息
from datetime import tzinfo timedelta datetime
ZERO = timedelta(0)
HOUR = timedelta(hours=1)
SECOND = timedelta(seconds=1)
# A class capturing the platform‘s idea of local time.
# (May result in wrong values on historical times in
# timezones where UTC offset and/or the DST rules had
# changed in the past.)
import time as _time
STDOFFSET = timedelta(seconds = -_time.timezone)
if _time.daylight:
DSTOFFSET = timedelta(seconds = -_time.altzone)
else:
DSTOFFSET = STDOFFSET
DSTDIFF = DSTOFFSET - STDOFFSET
class LocalTimezone(tzinfo):
def fromutc(self dt):
assert dt.tzinfo is self
stamp = (dt - datetime(1970 1 1 tzinfo=self)) // SECOND
args = _time.localtime(stamp)[:6]
dst_diff = DSTDIFF // SECOND
# Detect fold
fold = (args == _time.localtime(stamp - dst_diff))
return datetime(*args microsecond=dt.microsecond
tzinfo=self fold=fold)
def utcoffset(self dt):
if self._isdst(dt):
return DSTOFFSET
else:
return STDOFFSET
def dst(self dt):
if self._isdst(dt):
return DSTDIFF
else:
return ZERO
def tzname(self dt):
return _time.tzname[self._isdst(dt)]
def _isdst(self dt):
tt = (dt.year dt.month dt.day
dt.hour dt.minute dt.second
dt.weekday() 0 0)
stamp = _time.mktime(tt)
tt = _time.localtime(stamp)
return tt.tm_isdst > 0
Local = LocalTimezone()
# A complete implementation of current DST rules for major US time zones.
def first_sunday_on_or_after(dt):
days_to_go = 6 - dt.weekday()
if days_to_go:
dt += timedelta(days_to_go)
return dt
# US DST Rules
#
# This is a simplified (i.e. wrong for a few cases) set of rules for US
# DST start and end times. For a complete and up-to-date set of DST rules
# and timezone definitions visit the Olson Database (or try pytz):
# http://www.twinsun.com/tz/tz-link.htm
# http://sourceforge.net/projects/pytz/ (might not be up-to-date)
#
# In the US since 2007 DST starts at 2am (standard time) on the second
# Sunday in March which is the first Sunday on or after Mar 8.
DSTSTART_2007 = datetime(1 3 8 2)
# and ends at 2am (DST time) on the first Sunday of Nov.
DSTEND_2007 = datetime(1 11 1 2)
# From 1987 to 2006 DST used to start at 2am (standard time) on the first
# Sunday in April and to end at 2am (DST time) on the last
# Sunday of October which is the first Sunday on or after Oct 25.
DSTSTART_1987_2006 = datetime(1 4 1 2)
DSTEND_1987_2006 = datetime(1 10 25 2)
# From 1967 to 1986 DST used to start at 2am (standard time) on the last
# Sunday in April (the one on or after April 24) and to end at 2am (DST time)
# on the last Sunday of October which is the first Sunday
# on or after Oct 25.
DSTSTART_1967_1986 = datetime(1 4 24 2)
DSTEND_1967_1986 = DSTEND_1987_2006
def us_dst_range(year):
# Find start
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-04-09 01:09 python-3.7.3-docs-html
文件 55478 2019-04-09 01:09 python-3.7.3-docs-htmlgenindex-T.html
目录 0 2019-02-14 13:30 python-3.7.3-docs-html\_downloads
目录 0 2019-02-14 13:30 python-3.7.3-docs-html\_downloadsa01ac1c40eb86ec0f9e3c8e80f9eca65
文件 5860 2019-02-14 13:27 python-3.7.3-docs-html\_downloadsa01ac1c40eb86ec0f9e3c8e80f9eca65 zinfo_examples.py
文件 10648 2019-04-09 01:09 python-3.7.3-docs-htmlgenindex-Q.html
文件 107837 2019-04-09 01:09 python-3.7.3-docs-htmlob
目录 0 2019-02-14 13:29 python-3.7.3-docs-htmlhowto
文件 146103 2019-04-09 01:01 python-3.7.3-docs-htmlhowto
egex.html
文件 300840 2019-04-09 01:01 python-3.7.3-docs-htmlhowtologging-cookbook.html
文件 108541 2019-04-09 01:01 python-3.7.3-docs-htmlhowtologging.html
文件 32483 2019-04-09 01:01 python-3.7.3-docs-htmlhowtoinstrumentation.html
文件 59324 2019-04-09 01:01 python-3.7.3-docs-htmlhowtocurses.html
文件 76009 2019-04-09 01:01 python-3.7.3-docs-htmlhowtounicode.html
文件 81527 2019-04-09 01:01 python-3.7.3-docs-htmlhowtoargparse.html
文件 9251 2019-04-09 01:01 python-3.7.3-docs-htmlhowtoindex.html
文件 47213 2019-04-09 01:01 python-3.7.3-docs-htmlhowtopyporting.html
文件 60129 2019-04-09 01:01 python-3.7.3-docs-htmlhowtodesc
文件 37660 2019-04-09 01:01 python-3.7.3-docs-htmlhowtoipaddress.html
文件 154516 2019-04-09 01:01 python-3.7.3-docs-htmlhowtofunctional.html
文件 40176 2019-04-09 01:01 python-3.7.3-docs-htmlhowtosockets.html
文件 72427 2019-04-09 01:01 python-3.7.3-docs-htmlhowtourllib2.html
文件 42143 2019-04-09 01:01 python-3.7.3-docs-htmlhowtocporting.html
文件 47225 2019-04-09 01:01 python-3.7.3-docs-htmlhowtosorting.html
文件 131757 2019-04-09 01:01 python-3.7.3-docs-htmlhowtoclinic.html
文件 577337 2019-04-09 01:00 python-3.7.3-docs-htmlcontents.html
目录 0 2019-02-14 13:29 python-3.7.3-docs-htmlfaq
文件 59828 2019-04-09 01:01 python-3.7.3-docs-htmlfaqextending.html
文件 208717 2019-04-09 01:01 python-3.7.3-docs-htmlfaqprogramming.html
文件 29135 2019-04-09 01:01 python-3.7.3-docs-htmlfaqwindows.html
文件 8242 2019-04-09 01:01 python-3.7.3-docs-htmlfaqindex.html
............此处省略1033个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)