Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
number of tests, all because of the codecs/_multibytecodecs issue described
here (it's not a Py3K issue, just something Py3K discovers):
http://mail.python.org/pipermail/python-dev/2006-April/064051.html
Hye-Shik Chang promised to look for a fix, so no need to fix it here. The
tests that are expected to break are:
test_codecencodings_cn
test_codecencodings_hk
test_codecencodings_jp
test_codecencodings_kr
test_codecencodings_tw
test_codecs
test_multibytecodec
This merge fixes an actual test failure (test_weakref) in this branch,
though, so I believe merging is the right thing to do anyway.
diff --git a/Doc/api/concrete.tex b/Doc/api/concrete.tex
index 5521b80..1982bae 100644
--- a/Doc/api/concrete.tex
+++ b/Doc/api/concrete.tex
@@ -156,7 +156,7 @@
Create a new integer object with a value of \var{ival}.
The current implementation keeps an array of integer objects for all
- integers between \code{-1} and \code{100}, when you create an int in
+ integers between \code{-5} and \code{256}, when you create an int in
that range you actually just get back a reference to the existing
object. So it should be possible to change the value of \code{1}. I
suspect the behaviour of Python in this case is undefined. :-)
@@ -333,7 +333,9 @@
The pointer value can be retrieved from the resulting value using
\cfunction{PyLong_AsVoidPtr()}.
\versionadded{1.5.2}
-\end{cfuncdesc}
+ \versionchanged[If the integer is larger than LONG_MAX,
+ a positive long integer is returned]{2.5}
+ \end{cfuncdesc}
\begin{cfuncdesc}{long}{PyLong_AsLong}{PyObject *pylong}
Return a C \ctype{long} representation of the contents of
@@ -394,6 +396,8 @@
produce a usable \ctype{void} pointer for values created with
\cfunction{PyLong_FromVoidPtr()}.
\versionadded{1.5.2}
+ \versionchanged[For values outside 0..LONG_MAX, both signed and
+ unsigned integers are acccepted]{2.5}
\end{cfuncdesc}
@@ -1803,8 +1807,9 @@
\begin{cfuncdesc}{PyObject*}{PyList_GetItem}{PyObject *list, Py_ssize_t index}
Return the object at position \var{pos} in the list pointed to by
- \var{p}. If \var{pos} is out of bounds, return \NULL{} and set an
- \exception{IndexError} exception.
+ \var{p}. The position must be positive, indexing from the end of the
+ list is not supported. If \var{pos} is out of bounds, return \NULL{}
+ and set an \exception{IndexError} exception.
\end{cfuncdesc}
\begin{cfuncdesc}{PyObject*}{PyList_GET_ITEM}{PyObject *list, Py_ssize_t i}
@@ -2264,8 +2269,8 @@
\begin{cfuncdesc}{PyObject*}{PyFunction_New}{PyObject *code,
PyObject *globals}
Return a new function object associated with the code object
- \var{code}. \var{globals} must be a dictionary with the the global
- varaibles accessible to the function.
+ \var{code}. \var{globals} must be a dictionary with the global
+ variables accessible to the function.
The function's docstring, name and \var{__module__} are retrieved
from the code object, the argument defaults and closure are set to
@@ -2811,6 +2816,7 @@
\begin{cfuncdesc}{PyObject*}{PyGen_New}{PyFrameObject *frame}
Create and return a new generator object based on the \var{frame} object.
+ A reference to \var{frame} is stolen by this function.
The parameter must not be \NULL{}.
\end{cfuncdesc}
@@ -3025,9 +3031,7 @@
\cfunction{PyNumber_Or()}, \cfunction{PyNumber_Xor()},
\cfunction{PyNumber_InPlaceAdd()}, \cfunction{PyNumber_InPlaceSubtract()},
\cfunction{PyNumber_InPlaceOr()}, and \cfunction{PyNumber_InPlaceXor()}).
-Note, \cfunction{PyNumber_InPlaceSubtract()} is also useful clearing
-clearing a set (\code{s-=s}).
-
+
\begin{ctypedesc}{PySetObject}
This subtype of \ctype{PyObject} is used to hold the internal data for
both \class{set} and \class{frozenset} objects. It is like a
@@ -3111,7 +3115,6 @@
\class{frozenset}, or an instance of a subtype.
\end{cfuncdesc}
-
The following functions are available for instances of \class{set} or
its subtypes but not for instances of \class{frozenset} or its subtypes.
@@ -3142,4 +3145,6 @@
of \class{set} or its subtype.
\end{cfuncdesc}
-
+\begin{cfuncdesc}{int}{PySet_Clear}{PyObject *set}
+ Empty an existing set of all elements.
+\end{cfuncdesc}