Commit Graph

3893 Commits

Author SHA1 Message Date
Antoine Pitrou
ac65d96777 Issue #12170: The count(), find(), rfind(), index() and rindex() methods
of bytes and bytearray objects now accept an integer between 0 and 255
as their first argument.  Patch by Petri Lehtinen.
2011-10-20 23:54:17 +02:00
Benjamin Peterson
dc37ce95e8 merge 3.2 2011-10-19 16:58:15 -04:00
Benjamin Peterson
9d9141f5db adjust braces a bit 2011-10-19 16:57:40 -04:00
Victor Stinner
6707293e75 Add consistency check to _PyUnicode_New() 2011-10-18 22:10:14 +02:00
Victor Stinner
3a50e7056e Issue #12281: Rewrite the MBCS codec to handle correctly replace and ignore
error handlers on all Windows versions. The MBCS codec is now supporting all
error handlers, instead of only replace to encode and ignore to decode.
2011-10-18 21:21:00 +02:00
Antoine Pitrou
cf28eacafe Issue #13188: When called without an explicit traceback argument,
generator.throw() now gets the traceback from the passed exception's
``__traceback__`` attribute.  Patch by Petri Lehtinen.
2011-10-18 16:42:55 +02:00
Antoine Pitrou
551ba20e8e Issue #13188: When called without an explicit traceback argument,
generator.throw() now gets the traceback from the passed exception's
`__traceback__` attribute.  Patch by Petri Lehtinen.
2011-10-18 16:40:50 +02:00
Antoine Pitrou
5b9f4c1539 Fix typo 2011-10-17 19:21:04 +02:00
Benjamin Peterson
897d059221 merge 3.2 (#13199) 2011-10-17 13:10:24 -04:00
Benjamin Peterson
2963fe0711 plug possible refleak (closes #13199) 2011-10-17 13:09:27 -04:00
Benjamin Peterson
7a6debe79c remove some duplication 2011-10-15 09:25:28 -04:00
Martin v. Löwis
1c67dd9b15 Port SetAttrString/HasAttrString to SetAttrId/GetAttrId. 2011-10-14 15:16:45 +02:00
Martin v. Löwis
bd928fef42 Rename _Py_identifier to _Py_IDENTIFIER. 2011-10-14 10:20:37 +02:00
Victor Stinner
f5cff56a1b Issue #13088: Add shared Py_hexdigits constant to format a number into base 16 2011-10-14 02:13:11 +02:00
Victor Stinner
d1a9cc29b9 dictviews_or() uses _Py_identifier 2011-10-13 22:51:17 +02:00
Martin v. Löwis
bfc6d74b25 Use GetAttrId directly. Proposed by Amaury. 2011-10-13 20:03:57 +02:00
Antoine Pitrou
f0b934b01a Reuse the stringlib in findchar(), and make its signature more convenient 2011-10-13 18:55:09 +02:00
Antoine Pitrou
c198d0599b Add a comment explaining this heuristic. 2011-10-13 18:07:37 +02:00
Antoine Pitrou
dda339e6d2 Simplify heuristic for when to use memchr 2011-10-13 17:58:11 +02:00
Victor Stinner
55c991197b Optimize unicode_subscript() for step != 1 and ascii strings 2011-10-13 01:17:06 +02:00
Victor Stinner
127226ba69 Don't use PyUnicode_MAX_CHAR_VALUE() macro in Py_MAX() 2011-10-13 01:12:34 +02:00
Victor Stinner
9e7a1bcfd6 Optimize findchar() for PyUnicode_1BYTE_KIND: use memchr and memrchr 2011-10-13 00:18:12 +02:00
Antoine Pitrou
dd4e2f0153 Issue #13155: Optimize finding the optimal character width of an unicode string 2011-10-13 00:02:27 +02:00
Victor Stinner
49a0a21f37 Unicode replace() avoids calling unicode_adjust_maxchar() when it's useless
Add also a special case if the result is an empty string.
2011-10-12 23:46:10 +02:00
Antoine Pitrou
6b4883dec0 PEP 3151 / issue #12555: reworking the OS and IO exception hierarchy. 2011-10-12 02:54:14 +02:00