Jim Fulton
8c5aeaa277
Implemented a new Py_CLEAR macro. This macro should be used when
...
decrementing the refcount of variables that might be accessed as a
result of calling Python
2004-07-14 19:07:35 +00:00
Tim Peters
e45d5a3b00
Claifications: visit procs are supplied by the core, users aren't
...
expected to write their own. A NULL "object" must not be passed to
the visit callback. A non-zero return from a visit proc isn't
necessarily an error return (and it doesn't matter to the tp_traverse
code *what* it might signify, their only job is to return it).
2004-07-13 17:18:10 +00:00
Tim Peters
183dabcd73
SF patch 986010: add missing doc for datetime C API, from
...
Anthony Tuininga.
This is a derived patch, taking the opportunity to add some organization
to the now-large pile of datetime-related macros, and to factor out
tedious repeated text.
Also improved some clumsy wording in NEWS.
2004-07-11 19:26:19 +00:00
Brett Cannon
711e7d97e4
Add PyArg_VaParseTupleAndKeywords(). Document this function and
...
PyArg_VaParse().
Closes patch #550732 . Thanks Greg Chapman.
2004-07-10 22:20:32 +00:00
Andrew M. Kuchling
d9dfe0213f
Remove a few elderly sentences
2004-07-10 13:48:54 +00:00
Andrew M. Kuchling
ff8113f8d0
Replace example with simpler alternative using PyGILState_{Ensure,Require). Can someone please confirm this change is OK?
2004-07-10 13:42:52 +00:00
Andrew M. Kuchling
371d98ab15
[Bug #987835 ] Add documentation from PEP 311. (Untested TeX code.)
2004-07-10 13:31:18 +00:00
Andrew M. Kuchling
ee5e4cd899
[Bug #984017 ] Incorrect prototype, fixed by Timothy Stranex
2004-07-07 13:07:47 +00:00
Brett Cannon
d88471f432
Change signatures for arguments to "s" and friends to be the proper ``const
...
char *`` instead of just ``char *``. Also added the mentioning of "const" in
some places where it was left out even when the signature already stated the
fact.
Closes bug #980925 .
2004-07-01 20:55:42 +00:00
Andrew M. Kuchling
6d3a0d2dff
[Bug #948970 ] Add PyExc_* symbols to index.
...
(I ran this through texcheck, but don't have LaTeX installed on this machine and therefore haven't
verified that the changes are accepted by LaTeX.)
2004-06-29 13:52:14 +00:00
Martin v. Löwis
ef82d2fdfe
Patch #923098 : Share interned strings in marshal.
2004-06-27 16:51:46 +00:00
Tim Peters
9ddf40b4e1
SF patch 876130: add C API to datetime module, from Anthony Tuininga.
...
The LaTeX is untested (well, so is the new API, for that matter).
Note that I also changed NULL to get spelled consistently in concrete.tex.
If that was a wrong thing to do, Fred should yell at me.
2004-06-20 22:41:32 +00:00
Neil Schemenauer
d68d3ee3dd
Note that memory returned by PyBuffer_New is not specifically aligned.
...
Closes SF bug #472568 .
2004-06-08 02:58:50 +00:00
Andrew M. Kuchling
1b50b43bee
[Bug #936837 ] Add missing word
2004-06-05 19:00:55 +00:00
Martin v. Löwis
9bc4f2def3
Drop claims that Unicode always means UCS-2. Fixes #881861 .
2004-06-03 09:55:28 +00:00
Hye-Shik Chang
974ed7cfa5
- SF #962502 : Add two more methods for unicode type; width() and
...
iswide() for east asian width manipulation. (Inspired by David
Goodger, Reviewed by Martin v. Loewis)
- Move _PyUnicode_TypeRecord.flags to the end of the struct so that
no padding is added for UCS-4 builds. (Suggested by Martin v. Loewis)
2004-06-02 16:49:17 +00:00
Martin v. Löwis
dd07e59eee
Document PyModule_AddIntConstant to take a long. Fixes #962471 .
...
Will backport to 2.3.
2004-06-02 12:45:27 +00:00
Martin v. Löwis
e440e47e91
Patch #957398 : Add public API for Generator Object/Type.
2004-06-01 15:22:42 +00:00
Fred Drake
043fff0881
minor wording cleanup
2004-05-12 03:20:37 +00:00
Nicholas Bastin
e9c2ecfb96
Removed 'U' from the documentation for Py_BuildValue to bring it in line
...
with the elimination of 'U' in modsupport.c on 2000/04/28 (replaced
with 'u' and 'u#' per fdrake's comments).
2004-05-04 19:25:56 +00:00
Thomas Heller
1328b52c6f
Two new public API functions, Py_IncRef and Py_DecRef. Useful for
...
dynamic embedders of Python.
2004-04-22 17:23:49 +00:00
Raymond Hettinger
e5fced781b
SF bug #936827 : PyNumber_And() 's description
...
Fix typo.
2004-04-17 11:57:40 +00:00
Fred Drake
34c43202eb
Emphasize the requirement that Python.h be included first more strongly.
...
Closes SF bug #837228 ; backporting for Python 2.3.4.
2004-03-31 07:45:46 +00:00
Fred Drake
d0c3b26bd0
improve the very-high-level API docs (contributed by Jeff Epler)
...
Closes SF patch #798638 .
2004-03-25 15:44:56 +00:00
Fred Drake
85309512ec
Remove note that PyErr_SetInterrupt() is obsolete; add comment about the
...
fact that it was marked obsolete but is still needed.
Closes SF bug #919299 . Someone else should backport this to Python 2.3.
2004-03-25 14:25:28 +00:00
Raymond Hettinger
5232f50b19
SF bug: #921927 : Fixed a typo/thinko spelling "parameter" as "paramter"
2004-03-25 08:51:36 +00:00
Nicholas Bastin
c69ebe8d50
Enable the profiling of C functions (builtins and extensions)
2004-03-24 21:57:10 +00:00
Brett Cannon
65d63424b4
Minor grammatical fixes.
2004-03-18 01:38:11 +00:00
Brett Cannon
9b976e6636
Extremely minor typo fixed.
2004-03-18 00:49:01 +00:00
Raymond Hettinger
c1e4f9dd92
Use a new macro, PySequence_Fast_ITEMS to factor out code common to
...
three recent optimizations. Aside from reducing code volume, it
increases readability.
2004-03-12 08:04:00 +00:00
Fred Drake
70a30e8c94
markup correction
2004-02-17 04:17:36 +00:00
Martin v. Löwis
d3f4a1a00a
Patch #893566 : Document that tp_dealloc may be called from any thread.
2004-02-15 21:01:17 +00:00
Thomas Heller
8178a22e20
Documentation for PyDescr_NewClassMethod was missing - here's at least
...
the function prototype.
Already backported to release23-maint.
2004-02-09 10:47:11 +00:00
Raymond Hettinger
4cd5a08d8b
Fix small factual error.
2004-01-04 03:11:45 +00:00
Fred Drake
7a700b873b
clean up indexing for None, NotImplemented
...
closes SF bug #820344
2004-01-01 05:43:53 +00:00
Andrew MacIntyre
f72af655c5
At 2.2, the Py<type>_Check() family of API functions (macros) changed
...
semantics to include subtypes. Most concrete object APIs then had
a Py<type>_CheckExact() macro added to test for an object's type
not including subtypes.
The PyDict_CheckExact() macro wasn't created at that time, so I've added
it for API completeness/symmetry - even though nobody has complained
about its absence in the time since 2.2 was released.
Not a backport candidate.
2003-12-26 00:07:51 +00:00
Andrew MacIntyre
13cd8898d2
The semantics of PyList_Check() and PyDict_Check() changed at 2.2, along
...
with most other concrete object checks, but the docs weren't brought into
line.
PyList_CheckExact() was added at 2.2 but never documented.
backport candidate.
2003-12-25 23:57:52 +00:00
Raymond Hettinger
5469324cde
Note that \var{ppos} values are not consecutive and should not be altered.
2003-12-13 19:48:41 +00:00
Raymond Hettinger
8f5cdaa784
* Added a new method flag, METH_COEXIST.
...
* Used the flag to optimize set.__contains__(), dict.__contains__(),
dict.__getitem__(), and list.__getitem__().
2003-12-13 11:26:12 +00:00
Raymond Hettinger
e180307c10
Fix missing paren.
2003-12-07 12:49:48 +00:00
Raymond Hettinger
2619c9ec89
SF patch #838938 : Typos in the docs (Extending/Embedding + Python/C API)
...
(Contributed by Florent Rougon.)
2003-12-07 11:40:17 +00:00
Raymond Hettinger
bc0f2ab9bb
Expose dict_contains() and PyDict_Contains() with is about 10% faster
...
than PySequence_Contains() and more clearly applicable to dicts.
Apply the new function in setobject.c where __contains__ checking is
ubiquitous.
2003-11-25 21:12:14 +00:00
Fred Drake
28eae084bf
fix use of undefined markup
2003-11-10 14:48:48 +00:00
Brett Cannon
35d8360bf7
Document Py_RETURN_NONE.
2003-11-09 04:15:30 +00:00
Martin v. Löwis
5ce2fecf8e
Patch #837322 : Clarify owning, borrowing, stealing. Backported to 2.3.
2003-11-06 21:08:11 +00:00
Raymond Hettinger
9c7ed4c6df
Document that varlist can be NULL.
2003-10-26 17:20:07 +00:00
Martin v. Löwis
01a74b2fa1
Make CObjects mutable. Fixes #477441 .
2003-10-19 18:30:01 +00:00
Martin v. Löwis
95cf84a4f3
Patch #821093 : Fix various typos.
2003-10-19 07:32:24 +00:00
Neal Norwitz
7decf5e5af
SF #822262 , Typo in Doc/api/intro.tex
2003-10-13 17:47:30 +00:00
Raymond Hettinger
cb2da43db8
Extended tuple's C API to include a new function, PyTuple_Pack() that is
...
useful for rapidly building argument tuples without having to invoke the
more sophisticated machinery of Py_BuildValue().
2003-10-12 18:24:34 +00:00
Raymond Hettinger
92016dcc91
SF 810242. Fix doubled word errors.
2003-09-22 15:27:11 +00:00
Fred Drake
4ccf6e738e
fix \NULL with following space and no {}
2003-09-07 02:32:55 +00:00
Brett Cannon
77e0212b8a
Fix minor LaTeX bug of not ending a \NULL{} with the curly braces to get the
...
spacing correct in the output.
2003-09-07 02:22:16 +00:00
Raymond Hettinger
9bd308f67b
Fix doubled word typos.
2003-08-25 04:43:53 +00:00
Raymond Hettinger
f4bb1f946e
Fix typo.
2003-08-23 03:38:11 +00:00
Raymond Hettinger
f17d65da3a
SF patch#786531 'the the' typo. Contributed by George Yoshida
2003-08-12 00:01:16 +00:00
Raymond Hettinger
12c484dab8
SF patch #783807 : Clarify PySequence_Setitem ref counting
...
(Contributed by Jay T Miller.)
2003-08-09 04:37:14 +00:00
Fred Drake
b93b3e790e
Error noted in email to python-docs: PyObject corresponds to
...
PyObject_HEAD, not PyObject_VAR_HEAD.
2003-07-07 17:20:40 +00:00
Skip Montanaro
eec26f982a
Correct documentation of check interval - it's 100 by default, not 10 any
...
longer. Pointed out by Alex Martelli.
2003-07-02 21:38:34 +00:00
Fred Drake
6595e15331
Document PyThreadState_SetAsyncExc().
2003-06-29 02:14:31 +00:00
Neal Norwitz
847207acff
SF bug #719367 , string exceptions are deprecated
...
Remove references to string based exceptions in the doc.
2003-05-29 02:17:23 +00:00
Greg Ward
2748a4aa7e
Typo fix.
2003-05-29 01:41:51 +00:00
Martin v. Löwis
5467d4c0e3
Patch #612627 : Add encoding attribute to file objects, and determine
...
the terminal encoding on Windows and Unix.
2003-05-10 07:10:12 +00:00
Fred Drake
c22b2999f6
fix some markup errors
2003-04-23 20:38:41 +00:00
Thomas Heller
34d7f0927b
Document the new functions PyInt_AsUnsignedLongMask(), PyInt_AsUnsignedLongLongMask(),
...
PyLong_AsUnsignedLongMask(), PyLong_AsUnsignedLongLongMask().
2003-04-23 19:51:05 +00:00
Thomas Heller
42a1172cf4
Document the new format codes B, H, I, k, K.
2003-04-23 19:27:35 +00:00
Raymond Hettinger
2ed6dff796
As discussed on python-dev, revised docs to note that
...
PyObject_IsTrue() can have an error result.
Also, added missing docs for PyObject_Not().
Will backport.
2003-04-16 17:28:12 +00:00
Guido van Rossum
0fc8f00252
- pythunrun.c, Py_Finalize(): move the call to _Py_PrintReferences()
...
even farther down, to just before the call to
_PyObject_DebugMallocStats(). This required the following changes:
- pystate.c, PyThreadState_GetDict(): changed not to raise an
exception or issue a fatal error when no current thread state is
available, but simply return NULL without raising an exception
(ever).
- object.c, Py_ReprEnter(): when PyThreadState_GetDict() returns NULL,
don't raise an exception but return 0. This means that when
printing a container that's recursive, printing will go on and on
and on. But that shouldn't happen in the case we care about (see
first bullet).
- Updated Misc/NEWS and Doc/api/init.tex to reflect changes to
PyThreadState_GetDict() definition.
2003-04-15 15:12:39 +00:00
Fred Drake
12dd7b12c6
Minor markup adjustments.
2003-04-09 18:15:57 +00:00
Guido van Rossum
6db771871e
Try to discourage use of PyObject_Type().
2003-04-09 18:02:23 +00:00
Martin v. Löwis
24b8881f61
Patch #701395 : Correct documentation of PyUnicode_Splitlines.
2003-03-30 16:40:42 +00:00
Martin v. Löwis
b9a0f91218
Rename LONG_LONG to PY_LONG_LONG. Fixes #710285 .
2003-03-29 10:06:18 +00:00
Ka-Ping Yee
bd379e9627
PyWeakref_GetObject returns None (not NULL) when the referent is gone.
2003-03-28 18:07:16 +00:00
Fred Drake
9e1595e6e4
Minor clarification about the ob_size field.
2003-03-07 15:02:03 +00:00
Neal Norwitz
1930949a8a
Fix SF bug #697256 , PyMarshal_WriteShortToFile() documented, but not implemented
...
Remove prototype and doc. Backport candidate.
2003-03-06 22:04:24 +00:00
Guido van Rossum
41bcbe3050
Commit MvL's doc patch for SF bug #221327 . This adds an example of
...
calling into Python from a C thread.
2003-03-02 13:17:20 +00:00
Michael W. Hudson
1e71b04258
Update advice about __module__ and __name__ and tp_name wrt. new types.
...
Add \refs to GC section that were XXXed out.
2003-02-10 19:18:21 +00:00
Michael W. Hudson
bbe17f50eb
A typo, and desist from inaccurately describing some things as lists.
2003-02-10 19:12:42 +00:00
Michael W. Hudson
847f37543f
Correct lie about METH_NOARGS functions.
...
Backport candidate.
2003-02-06 18:37:11 +00:00
Skip Montanaro
1ff49a7734
* Add description of PyInt_FromString.
...
* Correct description of PyFloat_FromString. While ignored, the pend
argument still has to be given.
* Typo in PyLong_FromString.
2003-02-03 05:13:24 +00:00
Skip Montanaro
ae31e9b8c7
Add PyFloat_FromString. Left the char **pend argument out of the
...
description since while there, it is useless and ignored, according to Tim's
commen. (PyInt_FromString is also not described, but PyLong_FromString is.
Is the former deprecated?)
2003-02-03 03:56:36 +00:00
Raymond Hettinger
89fc4f3e56
Fix typo
2003-01-31 05:44:25 +00:00
Fred Drake
f536827c65
Include version annotation for PyObject_Call().
2003-01-25 07:48:13 +00:00
Walter Dörwald
d9a6ad3beb
Enhance issubclass() and PyObject_IsSubclass() so that a tuple is
...
supported as the second argument. This has the same meaning as
for isinstance(), i.e. issubclass(X, (A, B)) is equivalent
to issubclass(X, A) or issubclass(X, B). Compared to isinstance(),
this patch does not search the tuple recursively for classes, i.e.
any entry in the tuple that is not a class, will result in a
TypeError.
This closes SF patch #649608 .
2002-12-12 16:41:44 +00:00
Thomas Heller
ead60e5d1c
Typo: propogate -> propagate
...
Bugfix candidate.
2002-12-06 22:42:13 +00:00
Walter Dörwald
6d5f30eaed
Document that the second argument to PyObject_IsInstance
...
may be a tuple. This closes SF patch
http://www.python.org/sf/649095
Backport to release22-maint will follow.
2002-12-06 10:09:16 +00:00
Walter Dörwald
f171540ab8
Change int() so that passing a string, unicode, float or long argument
...
that is outside the integer range no longer raises OverflowError, but
returns a long object instead.
This fixes SF bug http://www.python.org/sf/635115
2002-11-19 20:49:15 +00:00
Fred Drake
674dae245a
Clarify that PyImport_AddModule() and PyImport_ExecCodeModule() don't
...
add any package support structure even if a dotted-name is passed for
the module.
Closes SF bug #424106 .
2002-11-13 15:13:38 +00:00
Fred Drake
71f5acdd1e
Minor cleanups, markup.
2002-11-05 22:19:45 +00:00
Neal Norwitz
1aca2d0cb3
Fix SF # 518775, buffer object API description truncated
2002-11-03 02:56:27 +00:00
Fred Drake
5e96f1ff1d
Correct the description of PyErr_Restore().
...
Closes SF bug #577000 .
2002-10-24 20:54:18 +00:00
Fred Drake
4b2472647a
Clarified the error cases and Unicode handling of PyString_AsString(),
...
PyString_AsStringAndSize(), and PyString_AS_STRING().
Closes SF bug #606463 .
2002-10-22 20:20:20 +00:00
Martin v. Löwis
36a4d8c20e
Remove mentionings of DOS.
2002-10-10 18:24:54 +00:00
Fred Drake
b915a38b6f
Added refcount information for PyObject_GetIter().
2002-10-04 18:58:58 +00:00
Fred Drake
111ee3208f
Ok, read the source this time: PyErr_SetObject() does not steal a reference.
2002-09-25 02:34:27 +00:00
Fred Drake
2f93644c1d
Clarify documentation for PyErr_SetObject() to describe the reference
...
count behavior.
2002-09-24 16:45:16 +00:00
Raymond Hettinger
d3e0265373
Document type and semantics of the tp_print return value. Closes SF 606464.
2002-09-10 13:48:01 +00:00
Raymond Hettinger
513069028f
Fix API typo. The write buffer is not const. Closes SF 606216.
2002-09-08 04:39:28 +00:00
Fred Drake
794643c314
Py_InitModule() and friends now accept NULL for the 'methods'
...
argument. This makes sense now that extension types can support
__init__ directly rather than requiring function constructors.
2002-08-14 20:59:38 +00:00
Barry Warsaw
29ce2d7d1e
Document PyExc_FutureWarning
2002-08-14 16:06:28 +00:00