mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-14 01:12:10 -05:00
Added more cross-references for strings. And one more for open().
This commit is contained in:
1 parent
cbd3fe5790
commit
cc5aedc6ce
3 files changed
+24
-13
No files matched your search
@@ -657,9 +657,13 @@ String Methods
|
||||
|
||||
.. index:: pair: string; methods
|
||||
|
||||
These are the string methods which both 8-bit strings and Unicode objects
|
||||
support:
|
||||
|
||||
Below are listed the string methods which both 8-bit strings and Unicode
|
||||
objects support. In addition, Python's strings support the
|
||||
sequence type methods described in the
|
||||
:ref:`typesseq` section (above). To output formatted strings use
|
||||
template strings or the ``%`` operator described in the
|
||||
:ref:`typesseq-strings` section (below). Also, see the :mod:`re` module for
|
||||
string functions based on regular expressions.
|
||||
|
||||
.. method:: str.capitalize()
|
||||
|
||||
@@ -1744,11 +1748,12 @@ File Objects
|
||||
module: os
|
||||
module: socket
|
||||
|
||||
File objects are implemented using C's ``stdio`` package and can be created with
|
||||
the built-in constructor :func:`file` described in section
|
||||
:ref:`built-in-funcs`. [#]_ File objects are also returned by some other
|
||||
built-in functions and methods, such as :func:`os.popen` and :func:`os.fdopen`
|
||||
and the :meth:`makefile` method of socket objects.
|
||||
File objects are implemented using C's ``stdio`` package and can be
|
||||
created with the built-in :func:`file` and (more usually) :func:`open`
|
||||
constructors described in the :ref:`built-in-funcs` section. [#]_ File
|
||||
objects are also returned by some other built-in functions and methods,
|
||||
such as :func:`os.popen` and :func:`os.fdopen` and the :meth:`makefile`
|
||||
method of socket objects.
|
||||
|
||||
When a file operation fails for an I/O-related reason, the exception
|
||||
:exc:`IOError` is raised. This includes situations where the operation is not
|
||||
|
||||
@@ -8,10 +8,15 @@
|
||||
|
||||
.. index:: module: re
|
||||
|
||||
The :mod:`string` module contains a number of useful constants and classes, as
|
||||
well as some deprecated legacy functions that are also available as methods on
|
||||
strings. See the module :mod:`re` for string functions based on regular
|
||||
expressions.
|
||||
The :mod:`string` module contains a number of useful constants and
|
||||
classes, as well as some deprecated legacy functions that are also
|
||||
available as methods on strings. In addition, Python's built-in string
|
||||
classes support the sequence type methods described in the
|
||||
:ref:`typesseq` section, and also the string-specific methods described
|
||||
in the :ref:`string-methods` section. To output formatted strings use
|
||||
template strings or the ``%`` operator described in the
|
||||
:ref:`typesseq-strings` section. Also, see the :mod:`re` module for
|
||||
string functions based on regular expressions.
|
||||
|
||||
|
||||
String constants
|
||||
|
||||
@@ -12,7 +12,8 @@ In addition, Python's built-in string classes support the sequence type
|
||||
methods described in the :ref:`typesseq` section, and also the
|
||||
string-specific methods described in the :ref:`string-methods` section.
|
||||
To output formatted strings use template strings or the ``%`` operator
|
||||
described in the :ref:`typesseq-strings` section.
|
||||
described in the :ref:`typesseq-strings` section. Also, see the
|
||||
:mod:`re` module for string functions based on regular expressions.
|
||||
|
||||
|
||||
.. toctree::
|
||||
|
||||
Reference in new issue
Block a user