summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
Diffstat (limited to 'Doc')
-rw-r--r--Doc/c-api/bytearray.rst6
-rw-r--r--Doc/c-api/type.rst9
-rw-r--r--Doc/library/codecs.rst3
-rw-r--r--Doc/library/http.cookies.rst6
-rw-r--r--Doc/library/os.rst2
-rw-r--r--Doc/tutorial/controlflow.rst4
-rw-r--r--Doc/tutorial/interpreter.rst4
7 files changed, 25 insertions, 9 deletions
diff --git a/Doc/c-api/bytearray.rst b/Doc/c-api/bytearray.rst
index 1b0f377..b90b3ff 100644
--- a/Doc/c-api/bytearray.rst
+++ b/Doc/c-api/bytearray.rst
@@ -10,7 +10,7 @@ Byte Array Objects
.. ctype:: PyByteArrayObject
- This subtype of :ctype:`PyObject` represents a Python string object.
+ This subtype of :ctype:`PyObject` represents a Python bytearray object.
.. cvar:: PyTypeObject PyByteArray_Type
@@ -36,10 +36,12 @@ Byte Array Objects
Return a new bytearray object from any object, *o*, that implements the
buffer protocol.
+ .. XXX expand about the buffer protocol, at least somewhere
+
.. cfunction:: PyObject* PyByteArray_FromStringAndSize(const char *string, Py_ssize_t len)
- Create a new bytearray object from *string* and it's length, *len*. On
+ Create a new bytearray object from *string* and its length, *len*. On
failure, *NULL* is returned.
diff --git a/Doc/c-api/type.rst b/Doc/c-api/type.rst
index bc0eeef..07f82c9 100644
--- a/Doc/c-api/type.rst
+++ b/Doc/c-api/type.rst
@@ -35,7 +35,14 @@ Type Objects
.. cfunction:: unsigned int PyType_ClearCache(void)
- Clears the internal lookup cache. Return the current version tag.
+ Clear the internal lookup cache. Return the current version tag.
+
+
+.. cfunction:: void PyType_Modified(PyTypeObject *type)
+
+ Invalidate the internal lookup cache for the type and all of its
+ subtypes. This function must be called after any manual
+ modification of the attributes or base classes of the type.
.. cfunction:: int PyType_HasFeature(PyObject *o, int feature)
diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst
index 42273051..29f0350 100644
--- a/Doc/library/codecs.rst
+++ b/Doc/library/codecs.rst
@@ -285,7 +285,8 @@ Codec Base Classes
------------------
The :mod:`codecs` module defines a set of base classes which define the
-interface and can also be used to easily write you own codecs for use in Python.
+interface and can also be used to easily write your own codecs for use in
+Python.
Each codec has to define four interfaces to make it usable as codec in Python:
stateless encoder, stateless decoder, stream reader and stream writer. The
diff --git a/Doc/library/http.cookies.rst b/Doc/library/http.cookies.rst
index 533e963..9bffa40 100644
--- a/Doc/library/http.cookies.rst
+++ b/Doc/library/http.cookies.rst
@@ -17,6 +17,12 @@ The module formerly strictly applied the parsing rules described in the
MSIE 3.0x doesn't follow the character rules outlined in those specs. As a
result, the parsing rules used are a bit less strict.
+.. note::
+
+ On encountering an invalid cookie, :exc:`CookieError` is raised, so if your
+ cookie data comes from a browser you should always prepare for invalid data
+ and catch :exc:`CookieError` on parsing.
+
.. exception:: CookieError
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 844f488..33d42da 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -1748,7 +1748,7 @@ Miscellaneous System Information
Return the number of processes in the system run queue averaged over the last
1, 5, and 15 minutes or raises :exc:`OSError` if the load average was
- unobtainable.
+ unobtainable. Availability: Unix.
.. function:: sysconf(name)
diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst
index 280c028..c21e531 100644
--- a/Doc/tutorial/controlflow.rst
+++ b/Doc/tutorial/controlflow.rst
@@ -475,8 +475,8 @@ called with an arbitrary number of arguments. These arguments will be wrapped
up in a tuple. Before the variable number of arguments, zero or more normal
arguments may occur. ::
- def fprintf(file, template, *args):
- file.write(template.format(args))
+ def write_multiple_items(file, separator, *args):
+ file.write(separator.join(args))
Normally, these ``variadic`` arguments will be last in the list of formal
diff --git a/Doc/tutorial/interpreter.rst b/Doc/tutorial/interpreter.rst
index 42fc6e1..27a91d0 100644
--- a/Doc/tutorial/interpreter.rst
+++ b/Doc/tutorial/interpreter.rst
@@ -51,8 +51,8 @@ and executes a *script* from that file.
A second way of starting the interpreter is ``python -c command [arg] ...``,
which executes the statement(s) in *command*, analogous to the shell's
:option:`-c` option. Since Python statements often contain spaces or other
-characters that are special to the shell, it is best to quote *command* in its
-entirety with double quotes.
+characters that are special to the shell, it is usually advised to quote
+*command* in its entirety with single quotes.
Some Python modules are also useful as scripts. These can be invoked using
``python -m module [arg] ...``, which executes the source file for *module* as