Skip to content

Commit ab32fec

Browse files
committed
Merged revisions 85572-85573,85606,85609-85622,85624,85626-85627,85629,85631,85633,85635-85636,85638-85639,85641-85642 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k ........ r85572 | georg.brandl | 2010-10-16 20:51:05 +0200 (Sa, 16 Okt 2010) | 1 line python#10122: typo fix. ........ r85573 | georg.brandl | 2010-10-16 20:53:08 +0200 (Sa, 16 Okt 2010) | 1 line python#10124: typo fix. ........ r85606 | georg.brandl | 2010-10-17 08:32:59 +0200 (So, 17 Okt 2010) | 1 line python#10058: tweak wording about exception returns. ........ r85609 | georg.brandl | 2010-10-17 11:19:03 +0200 (So, 17 Okt 2010) | 1 line python#8556: use less confusing mapping key in example. ........ r85610 | georg.brandl | 2010-10-17 11:23:05 +0200 (So, 17 Okt 2010) | 1 line python#8686: remove potentially confusing wording that does not add any value. ........ r85611 | georg.brandl | 2010-10-17 11:33:24 +0200 (So, 17 Okt 2010) | 1 line python#8811: small fixes to sqlite3 docs. ........ r85612 | georg.brandl | 2010-10-17 11:37:54 +0200 (So, 17 Okt 2010) | 1 line python#8855: add shelve security warning. ........ r85613 | georg.brandl | 2010-10-17 11:43:35 +0200 (So, 17 Okt 2010) | 1 line Fix hmac docs: it takes and returns bytes, except for hexdigest(). ........ r85614 | georg.brandl | 2010-10-17 11:46:11 +0200 (So, 17 Okt 2010) | 1 line python#8968: add actual name of token constants. ........ r85615 | georg.brandl | 2010-10-17 12:05:13 +0200 (So, 17 Okt 2010) | 1 line #459007: merge info from PC/getpathp.c and using/windows.rst to document the forming of sys.path under Windows. ........ r85616 | georg.brandl | 2010-10-17 12:07:29 +0200 (So, 17 Okt 2010) | 1 line Fix copy-paste error in example. ........ r85617 | georg.brandl | 2010-10-17 12:09:06 +0200 (So, 17 Okt 2010) | 1 line python#5212: md5 weaknesses do not affect hmac, so remove the note about that. ........ r85618 | georg.brandl | 2010-10-17 12:14:38 +0200 (So, 17 Okt 2010) | 1 line python#9086: correct wrong terminology about linking with pythonXY.dll. ........ r85619 | georg.brandl | 2010-10-17 12:15:50 +0200 (So, 17 Okt 2010) | 1 line Make file names consistent. ........ r85620 | georg.brandl | 2010-10-17 12:22:28 +0200 (So, 17 Okt 2010) | 1 line Remove second parser module example; it referred to non-readily-available example files, and this kind of discovery is much better done with the AST nowadays anyway. ........ r85621 | georg.brandl | 2010-10-17 12:24:54 +0200 (So, 17 Okt 2010) | 1 line python#9105: move pickle warning to a bit more prominent location. ........ r85622 | georg.brandl | 2010-10-17 12:28:04 +0200 (So, 17 Okt 2010) | 1 line python#9112: document error() and exit() methods of ArgumentParser. ........ r85624 | georg.brandl | 2010-10-17 12:34:28 +0200 (So, 17 Okt 2010) | 1 line Some markup and style fixes in argparse docs. ........ r85626 | georg.brandl | 2010-10-17 12:38:20 +0200 (So, 17 Okt 2010) | 1 line python#9117: fix syntax for class definition. ........ r85627 | georg.brandl | 2010-10-17 12:44:11 +0200 (So, 17 Okt 2010) | 1 line python#9138: reword introduction to classes in Python. ........ r85629 | georg.brandl | 2010-10-17 12:51:45 +0200 (So, 17 Okt 2010) | 1 line python#5962: clarify sys.exit() vs. threads. ........ r85631 | georg.brandl | 2010-10-17 12:53:54 +0200 (So, 17 Okt 2010) | 1 line Fix capitalization. ........ r85633 | georg.brandl | 2010-10-17 12:59:41 +0200 (So, 17 Okt 2010) | 1 line python#9204: remove mentions of removed types in the types module. ........ r85635 | georg.brandl | 2010-10-17 13:03:22 +0200 (So, 17 Okt 2010) | 1 line python#5121: fix claims about default values leading to segfaults. ........ r85636 | georg.brandl | 2010-10-17 13:06:14 +0200 (So, 17 Okt 2010) | 1 line python#9237: document sys.call_tracing(). ........ r85638 | georg.brandl | 2010-10-17 13:13:37 +0200 (So, 17 Okt 2010) | 1 line Port changes to pickle docs apparently lost in py3k. ........ r85639 | georg.brandl | 2010-10-17 13:23:56 +0200 (So, 17 Okt 2010) | 1 line Make twisted example a bit more logical. ........ r85641 | georg.brandl | 2010-10-17 13:29:07 +0200 (So, 17 Okt 2010) | 1 line Fix documentation of dis.opmap direction. ........ r85642 | georg.brandl | 2010-10-17 13:36:28 +0200 (So, 17 Okt 2010) | 1 line python#9730: fix example. ........
1 parent d6e0202 commit ab32fec

32 files changed

Lines changed: 339 additions & 583 deletions

Doc/c-api/bytearray.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ Byte Array Objects
1616
.. cvar:: PyTypeObject PyByteArray_Type
1717

1818
This instance of :ctype:`PyTypeObject` represents the Python bytearray type;
19-
it is the same object as ``bytearray`` in the Python layer.
19+
it is the same object as :class:`bytearray` in the Python layer.
20+
2021

2122
Type check macros
2223
^^^^^^^^^^^^^^^^^

Doc/c-api/bytes.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ called with a non-bytes parameter.
1818

1919
.. cvar:: PyTypeObject PyBytes_Type
2020

21-
.. index:: single: BytesType (in module types)
22-
2321
This instance of :ctype:`PyTypeObject` represents the Python bytes type; it
24-
is the same object as ``bytes`` in the Python layer. .
22+
is the same object as :class:`bytes` in the Python layer.
2523

2624

2725
.. cfunction:: int PyBytes_Check(PyObject *o)

Doc/c-api/complex.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Complex Numbers as Python Objects
8282
.. cvar:: PyTypeObject PyComplex_Type
8383

8484
This instance of :ctype:`PyTypeObject` represents the Python complex number
85-
type. It is the same object as ``complex`` and ``types.ComplexType``.
85+
type. It is the same object as :class:`complex` in the Python layer.
8686

8787

8888
.. cfunction:: int PyComplex_Check(PyObject *p)

Doc/c-api/dict.rst

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,8 @@ Dictionary Objects
1515

1616
.. cvar:: PyTypeObject PyDict_Type
1717

18-
.. index::
19-
single: DictType (in module types)
20-
single: DictionaryType (in module types)
21-
2218
This instance of :ctype:`PyTypeObject` represents the Python dictionary
23-
type. This is exposed to Python programs as ``dict`` and
24-
``types.DictType``.
19+
type. This is the same object as :class:`dict` in the Python layer.
2520

2621

2722
.. cfunction:: int PyDict_Check(PyObject *p)

Doc/c-api/float.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@ Floating Point Objects
1515

1616
.. cvar:: PyTypeObject PyFloat_Type
1717

18-
.. index:: single: FloatType (in modules types)
19-
2018
This instance of :ctype:`PyTypeObject` represents the Python floating point
21-
type. This is the same object as ``float`` and ``types.FloatType``.
19+
type. This is the same object as :class:`float` in the Python layer.
2220

2321

2422
.. cfunction:: int PyFloat_Check(PyObject *p)

Doc/c-api/intro.rst

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -361,15 +361,16 @@ traceback.
361361

362362
.. index:: single: PyErr_Occurred()
363363

364-
For C programmers, however, error checking always has to be explicit. All
365-
functions in the Python/C API can raise exceptions, unless an explicit claim is
366-
made otherwise in a function's documentation. In general, when a function
367-
encounters an error, it sets an exception, discards any object references that
368-
it owns, and returns an error indicator --- usually *NULL* or ``-1``. A few
369-
functions return a Boolean true/false result, with false indicating an error.
370-
Very few functions return no explicit error indicator or have an ambiguous
371-
return value, and require explicit testing for errors with
372-
:cfunc:`PyErr_Occurred`.
364+
For C programmers, however, error checking always has to be explicit. All
365+
functions in the Python/C API can raise exceptions, unless an explicit claim is
366+
made otherwise in a function's documentation. In general, when a function
367+
encounters an error, it sets an exception, discards any object references that
368+
it owns, and returns an error indicator. If not documented otherwise, this
369+
indicator is either *NULL* or ``-1``, depending on the function's return type.
370+
A few functions return a Boolean true/false result, with false indicating an
371+
error. Very few functions return no explicit error indicator or have an
372+
ambiguous return value, and require explicit testing for errors with
373+
:cfunc:`PyErr_Occurred`. These exceptions are always explicitly documented.
373374

374375
.. index::
375376
single: PyErr_SetString()

Doc/c-api/list.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ List Objects
1515

1616
.. cvar:: PyTypeObject PyList_Type
1717

18-
This instance of :ctype:`PyTypeObject` represents the Python list type. This
19-
is the same object as ``list`` in the Python layer.
18+
This instance of :ctype:`PyTypeObject` represents the Python list type.
19+
This is the same object as :class:`list` in the Python layer.
2020

2121

2222
.. cfunction:: int PyList_Check(PyObject *p)

Doc/c-api/long.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ All integers are implemented as "long" integer objects of arbitrary size.
1818
.. cvar:: PyTypeObject PyLong_Type
1919

2020
This instance of :ctype:`PyTypeObject` represents the Python integer type.
21-
This is the same object as ``int``.
21+
This is the same object as :class:`int` in the Python layer.
2222

2323

2424
.. cfunction:: int PyLong_Check(PyObject *p)

Doc/c-api/slice.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ Slice Objects
88

99
.. cvar:: PyTypeObject PySlice_Type
1010

11-
.. index:: single: SliceType (in module types)
12-
13-
The type object for slice objects. This is the same as ``slice`` and
14-
``types.SliceType``.
11+
The type object for slice objects. This is the same as :class:`slice` in the
12+
Python layer.
1513

1614

1715
.. cfunction:: int PySlice_Check(PyObject *ob)

Doc/c-api/tuple.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@ Tuple Objects
1515

1616
.. cvar:: PyTypeObject PyTuple_Type
1717

18-
.. index:: single: TupleType (in module types)
19-
20-
This instance of :ctype:`PyTypeObject` represents the Python tuple type; it is
21-
the same object as ``tuple`` and ``types.TupleType`` in the Python layer..
18+
This instance of :ctype:`PyTypeObject` represents the Python tuple type; it
19+
is the same object as :class:`tuple` in the Python layer.
2220

2321

2422
.. cfunction:: int PyTuple_Check(PyObject *p)

0 commit comments

Comments
 (0)