Marc-André Lemburg
df4f6e9fa6
Clarify the docs for Py_UNICODE.
2005-10-10 19:08:41 +00:00
Walter Dörwald
d1c1e10f70
Part of SF patch #1313939 : Speedup charmap decoding by extending
...
PyUnicode_DecodeCharmap() the accept a unicode string as the mapping
argument which is used as a mapping table.
This code isn't used by any of the codecs yet.
2005-10-06 20:29:57 +00:00
Georg Brandl
e53475ddd1
bug [ 1306449 ] PyString_AsStringAndSize() return value documented wrong
2005-09-28 12:53:12 +00:00
Georg Brandl
99363b6a19
- Correct PyBool_FromLong's return type and its description.
...
- Unify function description mode ("Return X" vs "Returns X")
2005-09-03 07:27:26 +00:00
Raymond Hettinger
94fedf9bfd
Expand the API notes.
2005-08-17 12:23:45 +00:00
Raymond Hettinger
0c230b9dac
Note that the PyNumber protocol can access most set methods directly.
2005-08-17 10:05:22 +00:00
Raymond Hettinger
c47e01d020
Numerous fix-ups to C API and docs. Added tests for C API.
2005-08-16 10:44:15 +00:00
Raymond Hettinger
beb3101b05
Add a C API for sets and frozensets.
2005-08-16 03:47:52 +00:00
Neil Schemenauer
c49322951f
Fix grammar (it's -> its).
2005-06-18 17:54:13 +00:00
Brett Cannon
5bbe6ad2b5
Fix name for PyDateTime_FromDateAndTime.
...
Closes bug #1124278 .
2005-02-17 05:17:17 +00:00
Raymond Hettinger
8ef9b3e527
SF bug #1082944 : Incorrect docs for PyUnicode_TailMatch
...
* Note correct return type is int.
* Note that -1 returned on failure.
2004-12-10 17:12:32 +00:00
Marc-André Lemburg
a9cadcd41b
Correct the handling of 0-termination of PyUnicode_AsWideChar()
...
and its usage in PyLocale_strcoll().
Clarify the documentation on this.
Thanks to Andreas Degert for pointing this out.
2004-11-22 13:02:31 +00:00
Nicholas Bastin
975e725fc7
Fix typo in PyDict_Items doc
2004-09-29 21:39:26 +00:00
Walter Dörwald
69652035bc
SF patch #998993 : The UTF-8 and the UTF-16 stateful decoders now support
...
decoding incomplete input (when the input stream is temporarily exhausted).
codecs.StreamReader now implements buffering, which enables proper
readline support for the UTF-16 decoders. codecs.StreamReader.read()
has a new argument chars which specifies the number of characters to
return. codecs.StreamReader.readline() and codecs.StreamReader.readlines()
have a new argument keepends. Trailing "\n"s will be stripped from the lines
if keepends is false. Added C APIs PyUnicode_DecodeUTF8Stateful and
PyUnicode_DecodeUTF16Stateful.
2004-09-07 20:24:22 +00:00
Andrew M. Kuchling
4eb1a00cc1
[Patch #1003861 from Dima Dorfman] Fix markup in concrete.tex:
...
PyObject* o -> PyObject *o to be consistent with the
rest of the file
- Correct markup for Py_True
- Remove duplicate description of PyBool_Check
2004-08-07 20:19:24 +00:00
Hye-Shik Chang
e9ddfbb412
SF #989185 : Drop unicode.iswide() and unicode.width() and add
...
unicodedata.east_asian_width(). You can still implement your own
simple width() function using it like this:
def width(u):
w = 0
for c in unicodedata.normalize('NFC', u):
cwidth = unicodedata.east_asian_width(c)
if cwidth in ('W', 'F'): w += 2
else: w += 1
return w
2004-08-04 07:38:35 +00:00
Fred Drake
2be406bd9f
let's avoid the extra nesting where reasonable
2004-08-03 16:02:35 +00:00
Neal Norwitz
7fdd92f31f
Fix typo though
2004-08-02 21:56:33 +00:00
Raymond Hettinger
829d6c4138
Fix doubled word.
2004-08-02 08:36:07 +00:00
Skip Montanaro
6d3db7000e
Add missing doc for Py_True/Py_False. Use the correct macro to define
...
Py_RETURN_FALSE and Py_RETURN_TRUE.
2004-07-29 02:16:04 +00:00
Skip Montanaro
33ee76ae9e
A little boolean music if you please, maestro... (Not sure I have the
...
versionadded{} args quite right).
2004-07-28 14:17:04 +00:00
Thomas Heller
fe0808382b
Fix an uncorrect function prototype.
...
Will backport to release23-maint.
BTW: Shouldn't it read PY_LONG_LONG instead of 'long long' ?
2004-07-23 14:49:52 +00:00
Tim Peters
8ff9f9f4aa
Supply missing word in new datetime docs, aggravated by copy-paste-edit.
2004-07-17 01:42:26 +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
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
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
Raymond Hettinger
5232f50b19
SF bug: #921927 : Fixed a typo/thinko spelling "parameter" as "paramter"
2004-03-25 08:51:36 +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
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
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
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
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
f4bb1f946e
Fix typo.
2003-08-23 03:38:11 +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
Martin v. Löwis
24b8881f61
Patch #701395 : Correct documentation of PyUnicode_Splitlines.
2003-03-30 16:40:42 +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
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