205 Commits

Author SHA1 Message Date
Fred Drake
409bb439ed Backport Skip's patch for SF bug #534495:
exceptions.tex 1.5

fix a typo in PyErr_Format table and add row for 'p' format char
closes bug 534495
2002-03-27 14:08:21 +00:00
Fred Drake
804fea92fd Add a note that Py_None needs the same reference count treatment as any
other PyObject *.
This closes SF bug #494007.
2002-03-12 20:18:01 +00:00
Fred Drake
8a944345ce Documentation for PyObject_GetIter(), contributed by Greg Chapman
(with only minor changes by Fred).
This closes SF bug #498607.
2002-03-11 19:01:58 +00:00
Fred Drake
2d677d29e2 Correct the refcount information for the PyWeakref_GetObject() function.
This closes SF bug #520087.
2002-02-20 05:08:02 +00:00
Fred Drake
7b52ef2d3c Close an improperly-closed verbatim environment.
This closes SF patch #496215.

Add a little more detail to the example that had not been closed.
2001-12-28 04:30:38 +00:00
Fred Drake
54e6294197 A number of small adjustments. 2001-12-11 19:40:16 +00:00
Tim Peters
f582b82fe9 SF bug #491415 PyDict_UpdateFromSeq2() unused
PyDict_UpdateFromSeq2():  removed it.
PyDict_MergeFromSeq2():  made it public and documented it.
PyDict_Merge() docs:  updated to reveal <wink> that the second
argument can be any mapping object.
2001-12-11 18:51:08 +00:00
Fred Drake
32a3587345 Document that PyString_FromString() cannot take NULL as a parameter.
This closes SF bug #489872.
2001-12-06 20:38:15 +00:00
Fred Drake
551ffae30c Clarify that the Python runtime may behave mysteriously when an exception
is not handled properly.
This closes SF bug #485153.
2001-12-03 17:56:09 +00:00
Fred Drake
3570551d6f Remove most references to __members__ and __methods__, leaving only one pair
of references that now state that these attributes have been removed,
directing the reader to the dir() function.
This closes SF bug #456420.
2001-12-03 17:32:27 +00:00
Fred Drake
f07125ee53 PyErr_Format() does not return a new reference; it always returns NULL.
This closes SF bug #488387.
2001-12-03 16:36:43 +00:00
Fred Drake
454af89712 Update the signature of PyFile_WriteString(). 2001-11-29 22:42:59 +00:00
Fred Drake
c37b65ee10 Clean up some markup cruft. A number of the macros that take no
parameters (like \UNIX) are commonly entered using an empty group to
separate the markup from a following inter-word space; this is not
needed when the next character is punctuation, or the markup is the
last thing in the enclosing group.  These cases were marked
inconsistently; the empty group is now *only* used when needed.
2001-11-28 07:26:15 +00:00
Fred Drake
cd8474e6a2 Add documentation for the PyCell* APIs. 2001-11-26 21:29:17 +00:00
Fred Drake
50ecc15d05 Add omitted word for clarity. 2001-11-17 06:39:18 +00:00
Thomas Heller
bfeeeee851 Fix obvious typos. 2001-11-12 07:46:31 +00:00
Fred Drake
94ead57dc3 Added version annotations, remove hard tabs. 2001-11-09 23:34:26 +00:00
Jeremy Hylton
89c3a22a27 Add PyObject_CheckReadBuffer(), which returns true if its argument
supports the single-segment readable buffer interface.

Add documentation for this and other PyObject_XXXBuffer() calls.
2001-11-09 21:59:42 +00:00
Fred Drake
1b58bff8a0 More refcount information. 2001-10-29 17:43:14 +00:00
Fred Drake
b0c079e3e5 PyObject_CallFunctionObArgs() ---> PyObject_CallFunctionObjArgs()
PyObject_CallMethodObArgs() ---> PyObject_CallMethodObjArgs()
2001-10-28 02:39:03 +00:00
Fred Drake
c44e9eca66 Added docs for PyObject_CallFunctionObArgs() and PyObject_CallMethodObArgs().
Minor cleanups & markup consistency fixes.
2001-10-26 16:38:38 +00:00
Fred Drake
81c7aa2c7b Added refcount data for PyObject_CallFunctionObArgs() and
PyObject_CallMethodObArgs().
2001-10-26 16:29:22 +00:00
Tim Peters
1fc240e851 Generalize dictionary() to accept a sequence of 2-sequences. At the
outer level, the iterator protocol is used for memory-efficiency (the
outer sequence may be very large if fully materialized); at the inner
level, PySequence_Fast() is used for time-efficiency (these should
always be sequences of length 2).

dictobject.c, new functions PyDict_{Merge,Update}FromSeq2.  These are
wholly analogous to PyDict_{Merge,Update}, but process a sequence-of-2-
sequences argument instead of a mapping object.  For now, I left these
functions file static, so no corresponding doc changes.  It's tempting
to change dict.update() to allow a sequence-of-2-seqs argument too.

Also changed the name of dictionary's keyword argument from "mapping"
to "x".  Got a better name?  "mapping_or_sequence_of_pairs" isn't
attractive, although more so than "mosop" <wink>.

abstract.h, abstract.tex:  Added new PySequence_Fast_GET_SIZE function,
much faster than going thru the all-purpose PySequence_Size.

libfuncs.tex:
- Document dictionary().
- Fiddle tuple() and list() to admit that their argument is optional.
- The long-winded repetitions of "a sequence, a container that supports
  iteration, or an iterator object" is getting to be a PITA.  Many
  months ago I suggested factoring this out into "iterable object",
  where the definition of that could include being explicit about
  generators too (as is, I'm not sure a reader outside of PythonLabs
  could guess that "an iterator object" includes a generator call).
- Please check my curly braces -- I'm going blind <0.9 wink>.

abstract.c, PySequence_Tuple():  When PyObject_GetIter() fails, leave
its error msg alone now (the msg it produces has improved since
PySequence_Tuple was generalized to accept iterable objects, and
PySequence_Tuple was also stomping on the msg in cases it shouldn't
have even before PyObject_GetIter grew a better msg).
2001-10-26 05:06:50 +00:00
Fred Drake
847c51a181 Slightly better conformance to the Python C style guide. 2001-10-25 15:53:44 +00:00
Fred Drake
c84f2c5068 Documentation for the new PyArg_UnpackTuple() function. 2001-10-23 21:10:18 +00:00