Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1107a3e

Browse files
committed
Merge doc fixups from 3.6
2 parents 6496daf + 2854018 commit 1107a3e

7 files changed

Lines changed: 21 additions & 21 deletions

File tree

Doc/howto/clinic.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Argument Clinic's primary goal
3030
is to take over responsibility for all argument parsing code
3131
inside CPython. This means that, when you convert a function
3232
to work with Argument Clinic, that function should no longer
33-
do any of its own argument parsing--the code generated by
33+
do any of its own argument parsingthe code generated by
3434
Argument Clinic should be a "black box" to you, where CPython
3535
calls in at the top, and your code gets called at the bottom,
3636
with ``PyObject *args`` (and maybe ``PyObject *kwargs``)
@@ -43,12 +43,12 @@ redundant information in a surprising number of places.
4343
When you use Argument Clinic, you don't have to repeat yourself.
4444

4545
Obviously, no one would want to use Argument Clinic unless
46-
it's solving their problem--and without creating new problems of
46+
it's solving their problemand without creating new problems of
4747
its own.
4848
So it's paramount that Argument Clinic generate correct code.
4949
It'd be nice if the code was faster, too, but at the very least
5050
it should not introduce a major speed regression. (Eventually Argument
51-
Clinic *should* make a major speedup possible--we could
51+
Clinic *should* make a major speedup possiblewe could
5252
rewrite its code generator to produce tailor-made argument
5353
parsing code, rather than calling the general-purpose CPython
5454
argument parsing library. That would make for the fastest
@@ -113,7 +113,7 @@ line. However, if the input hasn't changed, the output won't change either.
113113

114114
You should never modify the output portion of an Argument Clinic block. Instead,
115115
change the input until it produces the output you want. (That's the purpose of the
116-
checksum--to detect if someone changed the output, as these edits would be lost
116+
checksumto detect if someone changed the output, as these edits would be lost
117117
the next time Argument Clinic writes out fresh output.)
118118

119119
For the sake of clarity, here's the terminology we'll use with Argument Clinic:
@@ -166,7 +166,7 @@ Let's dive in!
166166
or if it has multiple calls to :c:func:`PyArg_ParseTuple`,
167167
you should choose a different function. Argument Clinic *does*
168168
support all of these scenarios. But these are advanced
169-
topics--let's do something simpler for your first function.
169+
topicslet's do something simpler for your first function.
170170

171171
Also, if the function has multiple calls to :c:func:`PyArg_ParseTuple`
172172
or :c:func:`PyArg_ParseTupleAndKeywords` where it supports different
@@ -188,7 +188,7 @@ Let's dive in!
188188

189189
If the old docstring had a first line that looked like a function
190190
signature, throw that line away. (The docstring doesn't need it
191-
anymore--when you use ``help()`` on your builtin in the future,
191+
anymorewhen you use ``help()`` on your builtin in the future,
192192
the first line will be built automatically based on the function's
193193
signature.)
194194

@@ -209,7 +209,7 @@ Let's dive in!
209209
6. Above the docstring, enter the name of the function, followed
210210
by a blank line. This should be the Python name of the function,
211211
and should be the full dotted path
212-
to the function--it should start with the name of the module,
212+
to the functionit should start with the name of the module,
213213
include any sub-modules, and if the function is a method on
214214
a class it should include the class name too.
215215

@@ -275,7 +275,7 @@ Let's dive in!
275275
What's a "converter"? It establishes both the type
276276
of the variable used in C, and the method to convert the Python
277277
value into a C value at runtime.
278-
For now you're going to use what's called a "legacy converter"--a
278+
For now you're going to use what's called a "legacy converter"a
279279
convenience syntax intended to make porting old code into Argument
280280
Clinic easier.
281281

@@ -425,7 +425,7 @@ Let's dive in!
425425
(Argument Clinic always generates its format strings
426426
with a ``:`` followed by the name of the function. If the
427427
existing code's format string ends with ``;``, to provide
428-
usage help, this change is harmless--don't worry about it.)
428+
usage help, this change is harmlessdon't worry about it.)
429429

430430
Third, for parameters whose format units require two arguments
431431
(like a length variable, or an encoding string, or a pointer
@@ -638,7 +638,7 @@ an optional argument on the *left* side of its required argument!
638638
Another example is ``curses.window.addch()``, which has a group of two
639639
arguments that must always be specified together. (The arguments are
640640
called ``x`` and ``y``; if you call the function passing in ``x``,
641-
you must also pass in ``y``--and if you don't pass in ``x`` you may not
641+
you must also pass in ``y``and if you don't pass in ``x`` you may not
642642
pass in ``y`` either.)
643643

644644
In any case, the goal of Argument Clinic is to support argument parsing
@@ -889,7 +889,7 @@ Advanced converters
889889
Remember those format units you skipped for your first
890890
time because they were advanced? Here's how to handle those too.
891891

892-
The trick is, all those format units take arguments--either
892+
The trick is, all those format units take argumentseither
893893
conversion functions, or types, or strings specifying an encoding.
894894
(But "legacy converters" don't support arguments. That's why we
895895
skipped them for your first function.) The argument you specified
@@ -1003,7 +1003,7 @@ Using a return converter
10031003
By default the impl function Argument Clinic generates for you returns ``PyObject *``.
10041004
But your C function often computes some C type, then converts it into the ``PyObject *``
10051005
at the last moment. Argument Clinic handles converting your inputs from Python types
1006-
into native C types--why not have it convert your return value from a native C type
1006+
into native C typeswhy not have it convert your return value from a native C type
10071007
into a Python type too?
10081008

10091009
That's what a "return converter" does. It changes your impl function to return
@@ -1185,7 +1185,7 @@ Writing a custom converter
11851185
As we hinted at in the previous section... you can write your own converters!
11861186
A converter is simply a Python class that inherits from ``CConverter``.
11871187
The main purpose of a custom converter is if you have a parameter using
1188-
the ``O&`` format unit--parsing this parameter means calling
1188+
the ``O&`` format unitparsing this parameter means calling
11891189
a :c:func:`PyArg_ParseTuple` "converter function".
11901190

11911191
Your converter class should be named ``*something*_converter``.
@@ -1227,7 +1227,7 @@ to specify in your subclass. Here's the current list:
12271227
The default value used to initialize the C variable when
12281228
there is no default, but not specifying a default may
12291229
result in an "uninitialized variable" warning. This can
1230-
easily happen when using option groups--although
1230+
easily happen when using option groupsalthough
12311231
properly-written code will never actually use this value,
12321232
the variable does get passed in to the impl, and the
12331233
C compiler will complain about the "use" of the
@@ -1403,7 +1403,7 @@ Let's start with defining some terminology:
14031403
all of processing, even from Clinic blocks *after* the
14041404

14051405
``suppress``
1406-
The text is suppressed--thrown away.
1406+
The text is suppressedthrown away.
14071407

14081408

14091409
Clinic defines five new directives that let you reconfigure its output.

Doc/howto/cporting.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ long/int Unification
9595
--------------------
9696

9797
Python 3 has only one integer type, :func:`int`. But it actually
98-
corresponds to Python 2's :func:`long` type--the :func:`int` type
98+
corresponds to Python 2's :func:`long` typethe :func:`int` type
9999
used in Python 2 was removed. In the C-API, ``PyInt_*`` functions
100100
are replaced by their ``PyLong_*`` equivalents.
101101

Doc/library/functions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ are always available. They are listed here in alphabetical order.
959959
the list of supported encodings.
960960

961961
*errors* is an optional string that specifies how encoding and decoding
962-
errors are to be handled--this cannot be used in binary mode.
962+
errors are to be handledthis cannot be used in binary mode.
963963
A variety of standard error handlers are available
964964
(listed under :ref:`error-handlers`), though any
965965
error handling name that has been registered with

Doc/library/hmac.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ This module also provides the following helper function:
111111

112112
If *a* and *b* are of different lengths, or if an error occurs,
113113
a timing attack could theoretically reveal information about the
114-
types and lengths of *a* and *b*--but not their values.
114+
types and lengths of *a* and *b*but not their values.
115115

116116

117117
.. versionadded:: 3.3

Doc/library/pdb.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ by the local file.
334334
return, jump, quit and their abbreviations) terminates the command list (as if
335335
that command was immediately followed by end). This is because any time you
336336
resume execution (even with a simple next or step), you may encounter another
337-
breakpoint--which could have its own command list, leading to ambiguities about
337+
breakpointwhich could have its own command list, leading to ambiguities about
338338
which list to execute.
339339

340340
If you use the 'silent' command in the command list, the usual message about

Doc/library/shutil.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Directory and files operations
107107
If *follow_symlinks* is false, and *src* and *dst* both
108108
refer to symbolic links, :func:`copystat` will operate on
109109
the symbolic links themselves rather than the files the
110-
symbolic links refer to--reading the information from the
110+
symbolic links refer toreading the information from the
111111
*src* symbolic link, and writing the information to the
112112
*dst* symbolic link.
113113

Doc/reference/datamodel.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2550,7 +2550,7 @@ An example of an asynchronous context manager class::
25502550
.. [#] "Does not support" here means that the class has no such method, or
25512551
the method returns ``NotImplemented``. Do not set the method to
25522552
``None`` if you want to force fallback to the right operand's reflected
2553-
method--that will instead have the opposite effect of explicitly
2553+
methodthat will instead have the opposite effect of explicitly
25542554
*blocking* such fallback.
25552555
25562556
.. [#] For operands of the same type, it is assumed that if the non-reflected method

0 commit comments

Comments
 (0)