summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/io.rst14
-rw-r--r--Doc/library/stdtypes.rst8
-rw-r--r--Doc/library/symtable.rst4
-rw-r--r--Doc/library/timeit.rst5
4 files changed, 28 insertions, 3 deletions
diff --git a/Doc/library/io.rst b/Doc/library/io.rst
index 5866113..71d3f67 100644
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -359,9 +359,15 @@ I/O Base Classes
implementation, but wrap one like :class:`BufferedWriter` and
:class:`BufferedReader`.
- :class:`BufferedIOBase` provides or overrides these methods in addition to
+ :class:`BufferedIOBase` provides or overrides these members in addition to
those from :class:`IOBase`:
+ .. attribute:: raw
+
+ The underlying raw stream (a :class:`RawIOBase` instance) that
+ :class:`BufferedIOBase` deals with. This is not part of the
+ :class:`BufferedIOBase` API and may not exist on some implementations.
+
.. method:: detach()
Separate the underlying raw stream from the buffer and return it.
@@ -607,6 +613,12 @@ Text I/O
A string, a tuple of strings, or ``None``, indicating the newlines
translated so far.
+ .. attribute:: buffer
+
+ The underlying binary buffer (a :class:`BufferedIOBase` instance) that
+ :class:`TextIOBase` deals with. This is not part of the
+ :class:`TextIOBase` API and may not exist on some implementations.
+
.. method:: detach()
Separate the underlying buffer from the :class:`TextIOBase` and return it.
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index bd02b37..1ccc457 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -583,10 +583,18 @@ Once an iterator's :meth:`__next__` method raises :exc:`StopIteration`, it must
continue to do so on subsequent calls. Implementations that do not obey this
property are deemed broken.
+
+.. _generator-types:
+
+Generator Types
+---------------
+
Python's :term:`generator`\s provide a convenient way to implement the iterator
protocol. If a container object's :meth:`__iter__` method is implemented as a
generator, it will automatically return an iterator object (technically, a
generator object) supplying the :meth:`__iter__` and :meth:`__next__` methods.
+More information about generators can be found in :ref:`the documentation for
+the yield expression <yieldexpr>`.
.. _typesseq:
diff --git a/Doc/library/symtable.rst b/Doc/library/symtable.rst
index 9ea3f01..9aafd4e 100644
--- a/Doc/library/symtable.rst
+++ b/Doc/library/symtable.rst
@@ -144,6 +144,10 @@ Examining Symbol Tables
Return ``True`` if the symbol is global.
+ .. method:: is_declared_global()
+
+ Return ``True`` if the symbol is declared global with a global statement.
+
.. method:: is_local()
Return ``True`` if the symbol is local to its block.
diff --git a/Doc/library/timeit.rst b/Doc/library/timeit.rst
index 495ac81..a85fa3e 100644
--- a/Doc/library/timeit.rst
+++ b/Doc/library/timeit.rst
@@ -24,8 +24,9 @@ The module defines the following public class:
The constructor takes a statement to be timed, an additional statement used for
setup, and a timer function. Both statements default to ``'pass'``; the timer
- function is platform-dependent (see the module doc string). The statements may
- contain newlines, as long as they don't contain multi-line string literals.
+ function is platform-dependent (see the module doc string). *stmt* and *setup*
+ may also contain multiple statements separated by ``;`` or newlines, as long as
+ they don't contain multi-line string literals.
To measure the execution time of the first statement, use the :meth:`timeit`
method. The :meth:`repeat` method is a convenience to call :meth:`timeit`