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

Skip to content

Commit 577a6af

Browse files
committed
Merge doc fixes from 3.2
2 parents f5949b5 + ebc991c commit 577a6af

8 files changed

Lines changed: 33 additions & 19 deletions

File tree

Doc/c-api/intro.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,8 +588,8 @@ frequently-used builds will be described in the remainder of this section.
588588

589589
Compiling the interpreter with the :c:macro:`Py_DEBUG` macro defined produces
590590
what is generally meant by "a debug build" of Python. :c:macro:`Py_DEBUG` is
591-
enabled in the Unix build by adding :option:`--with-pydebug` to the
592-
:file:`configure` command. It is also implied by the presence of the
591+
enabled in the Unix build by adding ``--with-pydebug`` to the
592+
:file:`./configure` command. It is also implied by the presence of the
593593
not-Python-specific :c:macro:`_DEBUG` macro. When :c:macro:`Py_DEBUG` is enabled
594594
in the Unix build, compiler optimization is disabled.
595595

Doc/distutils/install.rst

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,16 @@ in the name of the downloaded archive, e.g. :file:`foo-1.0.tar.gz` or
9696
directory: :file:`foo-1.0` or :file:`widget-0.9.7`. Additionally, the
9797
distribution will contain a setup script :file:`setup.py`, and a file named
9898
:file:`README.txt` or possibly just :file:`README`, which should explain that
99-
building and installing the module distribution is a simple matter of running ::
99+
building and installing the module distribution is a simple matter of running
100+
one command from a terminal::
100101

101102
python setup.py install
102103

104+
For Windows, this command should be run from a command prompt windows ("DOS
105+
box")::
106+
107+
setup.py install
108+
103109
If all these things are true, then you already know how to build and install the
104110
modules you've just downloaded: Run the command above. Unless you need to
105111
install things in a non-standard way or customize the build process, you don't
@@ -113,14 +119,11 @@ Standard Build and Install
113119
==========================
114120

115121
As described in section :ref:`inst-new-standard`, building and installing a module
116-
distribution using the Distutils is usually one simple command::
122+
distribution using the Distutils is usually one simple command to run from a
123+
terminal::
117124

118125
python setup.py install
119126

120-
On Unix, you'd run this command from a shell prompt; on Windows, you have to
121-
open a command prompt window ("DOS box") and do it there; on Mac OS X, you open
122-
a :command:`Terminal` window to get a shell prompt.
123-
124127

125128
.. _inst-platform-variations:
126129

Doc/distutils/introduction.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,17 @@ Some observations:
7979
for an example)
8080

8181
To create a source distribution for this module, you would create a setup
82-
script, :file:`setup.py`, containing the above code, and run::
82+
script, :file:`setup.py`, containing the above code, and run this command from a
83+
terminal::
8384

8485
python setup.py sdist
8586

86-
which will create an archive file (e.g., tarball on Unix, ZIP file on Windows)
87+
For Windows, open a command prompt windows ("DOS box") and change the command
88+
to::
89+
90+
setup.py sdist
91+
92+
:command:`sdist` will create an archive file (e.g., tarball on Unix, ZIP file on Windows)
8793
containing your setup script :file:`setup.py`, and your module :file:`foo.py`.
8894
The archive file will be named :file:`foo-1.0.tar.gz` (or :file:`.zip`), and
8995
will unpack into a directory :file:`foo-1.0`.

Doc/documenting/markup.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,12 @@ following example shows all of the features of this directive type::
9898

9999
Spam or ham the foo.
100100

101-
The signatures of object methods or data attributes should always include the
102-
type name (``.. method:: FileInput.input(...)``), even if it is obvious from the
103-
context which type they belong to; this is to enable consistent
104-
cross-references. If you describe methods belonging to an abstract protocol,
105-
such as "context managers", include a (pseudo-)type name too to make the
101+
The signatures of object methods or data attributes should not include the
102+
class name, but be nested in a class directive. The generated files will
103+
reflect this nesting, and the target identifiers (for HTML output) will use
104+
both the class and method name, to enable consistent cross-references. If you
105+
describe methods belonging to an abstract protocol such as context managers,
106+
use a class directive with a (pseudo-)type name too to make the
106107
index entries more informative.
107108

108109
The directives are:

Doc/library/builtins.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77

88
This module provides direct access to all 'built-in' identifiers of Python; for
99
example, ``builtins.open`` is the full name for the built-in function
10-
:func:`open`.
10+
:func:`open`. See :ref:`built-in-funcs` and :ref:`built-in-consts` for
11+
documentation.
12+
1113

1214
This module is not normally accessed explicitly by most applications, but can be
1315
useful in modules that provide objects with the same name as a built-in value,

Doc/library/constants.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _built-in-consts:
2+
13
Built-in Constants
24
==================
35

Doc/license.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ expat
847847
-----
848848

849849
The :mod:`pyexpat` extension is built using an included copy of the expat
850-
sources unless the build is configured :option:`--with-system-expat`::
850+
sources unless the build is configured ``--with-system-expat``::
851851

852852
Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
853853
and Clark Cooper
@@ -876,7 +876,7 @@ libffi
876876
------
877877

878878
The :mod:`_ctypes` extension is built using an included copy of the libffi
879-
sources unless the build is configured :option:`--with-system-libffi`::
879+
sources unless the build is configured ``--with-system-libffi``::
880880

881881
Copyright (c) 1996-2008 Red Hat, Inc and others.
882882

Doc/using/cmdline.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ Debug-mode variables
511511
~~~~~~~~~~~~~~~~~~~~
512512

513513
Setting these variables only has an effect in a debug build of Python, that is,
514-
if Python was configured with the :option:`--with-pydebug` build option.
514+
if Python was configured with the ``--with-pydebug`` build option.
515515

516516
.. envvar:: PYTHONTHREADDEBUG
517517

0 commit comments

Comments
 (0)