Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit27f23fe

Browse files
author
Autobuild bot on GitHub Actions
committed
update html
1 parent460cc80 commit27f23fe

File tree

1,043 files changed

+666830
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,043 files changed

+666830
-0
lines changed

‎3.8/30/.buildinfo

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Sphinx build info version 1
2+
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3+
config: 63e42a3eeb442f913f9cc43d4e4f0187
4+
tags: 645f666f9bcd5a90fca523b33c5a78b7
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
fromdatetimeimporttzinfo,timedelta,datetime
2+
3+
ZERO=timedelta(0)
4+
HOUR=timedelta(hours=1)
5+
SECOND=timedelta(seconds=1)
6+
7+
# A class capturing the platform's idea of local time.
8+
# (May result in wrong values on historical times in
9+
# timezones where UTC offset and/or the DST rules had
10+
# changed in the past.)
11+
importtimeas_time
12+
13+
STDOFFSET=timedelta(seconds=-_time.timezone)
14+
if_time.daylight:
15+
DSTOFFSET=timedelta(seconds=-_time.altzone)
16+
else:
17+
DSTOFFSET=STDOFFSET
18+
19+
DSTDIFF=DSTOFFSET-STDOFFSET
20+
21+
classLocalTimezone(tzinfo):
22+
23+
deffromutc(self,dt):
24+
assertdt.tzinfoisself
25+
stamp= (dt-datetime(1970,1,1,tzinfo=self))//SECOND
26+
args=_time.localtime(stamp)[:6]
27+
dst_diff=DSTDIFF//SECOND
28+
# Detect fold
29+
fold= (args==_time.localtime(stamp-dst_diff))
30+
returndatetime(*args,microsecond=dt.microsecond,
31+
tzinfo=self,fold=fold)
32+
33+
defutcoffset(self,dt):
34+
ifself._isdst(dt):
35+
returnDSTOFFSET
36+
else:
37+
returnSTDOFFSET
38+
39+
defdst(self,dt):
40+
ifself._isdst(dt):
41+
returnDSTDIFF
42+
else:
43+
returnZERO
44+
45+
deftzname(self,dt):
46+
return_time.tzname[self._isdst(dt)]
47+
48+
def_isdst(self,dt):
49+
tt= (dt.year,dt.month,dt.day,
50+
dt.hour,dt.minute,dt.second,
51+
dt.weekday(),0,0)
52+
stamp=_time.mktime(tt)
53+
tt=_time.localtime(stamp)
54+
returntt.tm_isdst>0
55+
56+
Local=LocalTimezone()
57+
58+
59+
# A complete implementation of current DST rules for major US time zones.
60+
61+
deffirst_sunday_on_or_after(dt):
62+
days_to_go=6-dt.weekday()
63+
ifdays_to_go:
64+
dt+=timedelta(days_to_go)
65+
returndt
66+
67+
68+
# US DST Rules
69+
#
70+
# This is a simplified (i.e., wrong for a few cases) set of rules for US
71+
# DST start and end times. For a complete and up-to-date set of DST rules
72+
# and timezone definitions, visit the Olson Database (or try pytz):
73+
# http://www.twinsun.com/tz/tz-link.htm
74+
# http://sourceforge.net/projects/pytz/ (might not be up-to-date)
75+
#
76+
# In the US, since 2007, DST starts at 2am (standard time) on the second
77+
# Sunday in March, which is the first Sunday on or after Mar 8.
78+
DSTSTART_2007=datetime(1,3,8,2)
79+
# and ends at 2am (DST time) on the first Sunday of Nov.
80+
DSTEND_2007=datetime(1,11,1,2)
81+
# From 1987 to 2006, DST used to start at 2am (standard time) on the first
82+
# Sunday in April and to end at 2am (DST time) on the last
83+
# Sunday of October, which is the first Sunday on or after Oct 25.
84+
DSTSTART_1987_2006=datetime(1,4,1,2)
85+
DSTEND_1987_2006=datetime(1,10,25,2)
86+
# From 1967 to 1986, DST used to start at 2am (standard time) on the last
87+
# Sunday in April (the one on or after April 24) and to end at 2am (DST time)
88+
# on the last Sunday of October, which is the first Sunday
89+
# on or after Oct 25.
90+
DSTSTART_1967_1986=datetime(1,4,24,2)
91+
DSTEND_1967_1986=DSTEND_1987_2006
92+
93+
defus_dst_range(year):
94+
# Find start and end times for US DST. For years before 1967, return
95+
# start = end for no DST.
96+
if2006<year:
97+
dststart,dstend=DSTSTART_2007,DSTEND_2007
98+
elif1986<year<2007:
99+
dststart,dstend=DSTSTART_1987_2006,DSTEND_1987_2006
100+
elif1966<year<1987:
101+
dststart,dstend=DSTSTART_1967_1986,DSTEND_1967_1986
102+
else:
103+
return (datetime(year,1,1), )*2
104+
105+
start=first_sunday_on_or_after(dststart.replace(year=year))
106+
end=first_sunday_on_or_after(dstend.replace(year=year))
107+
returnstart,end
108+
109+
110+
classUSTimeZone(tzinfo):
111+
112+
def__init__(self,hours,reprname,stdname,dstname):
113+
self.stdoffset=timedelta(hours=hours)
114+
self.reprname=reprname
115+
self.stdname=stdname
116+
self.dstname=dstname
117+
118+
def__repr__(self):
119+
returnself.reprname
120+
121+
deftzname(self,dt):
122+
ifself.dst(dt):
123+
returnself.dstname
124+
else:
125+
returnself.stdname
126+
127+
defutcoffset(self,dt):
128+
returnself.stdoffset+self.dst(dt)
129+
130+
defdst(self,dt):
131+
ifdtisNoneordt.tzinfoisNone:
132+
# An exception may be sensible here, in one or both cases.
133+
# It depends on how you want to treat them. The default
134+
# fromutc() implementation (called by the default astimezone()
135+
# implementation) passes a datetime with dt.tzinfo is self.
136+
returnZERO
137+
assertdt.tzinfoisself
138+
start,end=us_dst_range(dt.year)
139+
# Can't compare naive to aware objects, so strip the timezone from
140+
# dt first.
141+
dt=dt.replace(tzinfo=None)
142+
ifstart+HOUR<=dt<end-HOUR:
143+
# DST is in effect.
144+
returnHOUR
145+
ifend-HOUR<=dt<end:
146+
# Fold (an ambiguous hour): use dt.fold to disambiguate.
147+
returnZEROifdt.foldelseHOUR
148+
ifstart<=dt<start+HOUR:
149+
# Gap (a non-existent hour): reverse the fold rule.
150+
returnHOURifdt.foldelseZERO
151+
# DST is off.
152+
returnZERO
153+
154+
deffromutc(self,dt):
155+
assertdt.tzinfoisself
156+
start,end=us_dst_range(dt.year)
157+
start=start.replace(tzinfo=self)
158+
end=end.replace(tzinfo=self)
159+
std_time=dt+self.stdoffset
160+
dst_time=std_time+HOUR
161+
ifend<=dst_time<end+HOUR:
162+
# Repeated hour
163+
returnstd_time.replace(fold=1)
164+
ifstd_time<startordst_time>=end:
165+
# Standard time
166+
returnstd_time
167+
ifstart<=std_time<end-HOUR:
168+
# Daylight saving time
169+
returndst_time
170+
171+
172+
Eastern=USTimeZone(-5,"Eastern","EST","EDT")
173+
Central=USTimeZone(-6,"Central","CST","CDT")
174+
Mountain=USTimeZone(-7,"Mountain","MST","MDT")
175+
Pacific=USTimeZone(-8,"Pacific","PST","PDT")
10.9 KB
Loading

‎3.8/30/_images/logging_flow.png

21.5 KB
Loading
6.28 KB
Loading

‎3.8/30/_images/turtle-star.png

33 KB
Loading

‎3.8/30/_images/win_installer.png

92.9 KB
Loading

‎3.8/30/_sources/about.rst.txt

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
=====================
2+
About these documents
3+
=====================
4+
5+
6+
These documents are generated from `reStructuredText`_ sources by `Sphinx`_, a
7+
document processor specifically written for the Python documentation.
8+
9+
.. _reStructuredText:http://docutils.sourceforge.net/rst.html
10+
.. _Sphinx:http://sphinx-doc.org/
11+
12+
.. In the online version of these documents, you can submit comments and suggest
13+
changes directly on the documentation pages.
14+
15+
Development of the documentation and its toolchain is an entirely volunteer
16+
effort, just like Python itself. If you want to contribute, please take a
17+
look at the:ref:`reporting-bugs` page for information on how to do so. New
18+
volunteers are always welcome!
19+
20+
Many thanks go to:
21+
22+
* Fred L. Drake, Jr., the creator of the original Python documentation toolset
23+
and writer of much of the content;
24+
* the `Docutils<http://docutils.sourceforge.net/>`_ project for creating
25+
reStructuredText and the Docutils suite;
26+
* Fredrik Lundh for his `Alternative Python Reference
27+
<http://effbot.org/zone/pyref.htm>`_ project from which Sphinx got many good
28+
ideas.
29+
30+
31+
Contributors to the Python Documentation
32+
----------------------------------------
33+
34+
Many people have contributed to the Python language, the Python standard
35+
library, and the Python documentation. See:source:`Misc/ACKS` in the Python
36+
source distribution for a partial list of contributors.
37+
38+
It is only with the input and contributions of the Python community
39+
that Python has such wonderful documentation -- Thank You!

‎3.8/30/_sources/bugs.rst.txt

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
.. _reporting-bugs:
2+
3+
*****************
4+
Dealing with Bugs
5+
*****************
6+
7+
Python is a mature programming language which has established a reputation for
8+
stability. In order to maintain this reputation, the developers would like to
9+
know of any deficiencies you find in Python.
10+
11+
It can be sometimes faster to fix bugs yourself and contribute patches to
12+
Python as it streamlines the process and involves less people. Learn how to
13+
:ref:`contribute<contributing-to-python>`.
14+
15+
Documentation bugs
16+
==================
17+
18+
If you find a bug in this documentation or would like to propose an improvement,
19+
please submit a bug report on the:ref:`tracker<using-the-tracker>`. If you
20+
have a suggestion on how to fix it, include that as well.
21+
22+
If you're short on time, you can also email documentation bug reports to
23+
docs@python.org (behavioral bugs can be sent to python-list@python.org).
24+
'docs@' is a mailing list run by volunteers; your request will be noticed,
25+
though it may take a while to be processed.
26+
27+
..seealso::
28+
29+
`Documentation bugs`_
30+
A list of documentation bugs that have been submitted to the Python issue tracker.
31+
32+
`Issue Tracking<https://devguide.python.org/tracker/>`_
33+
Overview of the process involved in reporting an improvement on the tracker.
34+
35+
`Helping with Documentation<https://devguide.python.org/docquality/#helping-with-documentation>`_
36+
Comprehensive guide for individuals that are interested in contributing to Python documentation.
37+
38+
.. _using-the-tracker:
39+
40+
Using the Python issue tracker
41+
==============================
42+
43+
Bug reports for Python itself should be submitted via the Python Bug Tracker
44+
(https://bugs.python.org/). The bug tracker offers a Web form which allows
45+
pertinent information to be entered and submitted to the developers.
46+
47+
The first step in filing a report is to determine whether the problem has
48+
already been reported. The advantage in doing so, aside from saving the
49+
developers time, is that you learn what has been done to fix it; it may be that
50+
the problem has already been fixed for the next release, or additional
51+
information is needed (in which case you are welcome to provide it if you can!).
52+
To do this, search the bug database using the search box on the top of the page.
53+
54+
If the problem you're reporting is not already in the bug tracker, go back to
55+
the Python Bug Tracker and log in. If you don't already have a tracker account,
56+
select the "Register" link or, if you use OpenID, one of the OpenID provider
57+
logos in the sidebar. It is not possible to submit a bug report anonymously.
58+
59+
Being now logged in, you can submit a bug. Select the "Create New" link in the
60+
sidebar to open the bug reporting form.
61+
62+
The submission form has a number of fields. For the "Title" field, enter a
63+
*very* short description of the problem; less than ten words is good. In the
64+
"Type" field, select the type of your problem; also select the "Component" and
65+
"Versions" to which the bug relates.
66+
67+
In the "Comment" field, describe the problem in detail, including what you
68+
expected to happen and what did happen. Be sure to include whether any
69+
extension modules were involved, and what hardware and software platform you
70+
were using (including version information as appropriate).
71+
72+
Each bug report will be assigned to a developer who will determine what needs to
73+
be done to correct the problem. You will receive an update each time action is
74+
taken on the bug.
75+
76+
77+
..seealso::
78+
79+
`How to Report Bugs Effectively<https://www.chiark.greenend.org.uk/~sgtatham/bugs.html>`_
80+
Article which goes into some detail about how to create a useful bug report.
81+
This describes what kind of information is useful and why it is useful.
82+
83+
`Bug Report Writing Guidelines<https://developer.mozilla.org/en-US/docs/Mozilla/QA/Bug_writing_guidelines>`_
84+
Information about writing a good bug report. Some of this is specific to the
85+
Mozilla project, but describes general good practices.
86+
87+
.. _contributing-to-python:
88+
89+
Getting started contributing to Python yourself
90+
===============================================
91+
92+
Beyond just reporting bugs that you find, you are also welcome to submit
93+
patches to fix them. You can find more information on how to get started
94+
patching Python in the `Python Developer's Guide`_. If you have questions,
95+
the `core-mentorship mailing list`_ is a friendly place to get answers to
96+
any and all questions pertaining to the process of fixing issues in Python.
97+
98+
.. _Documentation bugs:https://bugs.python.org/issue?@filter=status&@filter=components&components=4&status=1&@columns=id,activity,title,status&@sort=-activity
99+
.. _Python Developer's Guide:https://devguide.python.org/
100+
.. _core-mentorship mailing list:https://mail.python.org/mailman3/lists/core-mentorship.python.org/
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
..highlight::c
2+
3+
.. _abstract:
4+
5+
**********************
6+
Abstract Objects Layer
7+
**********************
8+
9+
The functions in this chapter interact with Python objects regardless of their
10+
type, or with wide classes of object types (e.g. all numerical types, or all
11+
sequence types). When used on object types for which they do not apply, they
12+
will raise a Python exception.
13+
14+
It is not possible to use these functions on objects that are not properly
15+
initialized, such as a list object that has been created by:c:func:`PyList_New`,
16+
but whose items have not been set to some non-\``NULL`` value yet.
17+
18+
..toctree::
19+
20+
object.rst
21+
number.rst
22+
sequence.rst
23+
mapping.rst
24+
iter.rst
25+
buffer.rst
26+
objbuffer.rst

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp