Raymond Hettinger
b516370bcb
Issue 1242657: list(obj) can swallow KeyboardInterrupt.
2009-02-02 21:50:13 +00:00
Raymond Hettinger
7989a4dccb
Backport r67478
2008-12-03 15:42:10 +00:00
Andrew M. Kuchling
d810cdf849
Docstring changes: Specify exceptions raised
2008-10-04 01:04:24 +00:00
Nick Coghlan
53663a695e
Issue 2235: __hash__ is once again inherited by default, but inheritance can be blocked explicitly so that collections.Hashable remains meaningful
2008-07-15 14:27:37 +00:00
Gregory P. Smith
9d53457e59
Merge in release25-maint r60793:
...
Added checks for integer overflows, contributed by Google. Some are
only available if asserts are left in the code, in cases where they
can't be triggered from Python code.
2008-06-11 07:41:16 +00:00
Gregory P. Smith
dd96db63f6
This reverts r63675 based on the discussion in this thread:
...
http://mail.python.org/pipermail/python-dev/2008-June/079988.html
Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names
in the spirit of 3.0 are available via a #define only. See the email thread.
2008-06-09 04:58:54 +00:00
Georg Brandl
7a6de8b0f4
Some style nits. Also clarify in the docstrings what __sizeof__ does.
2008-06-01 16:42:16 +00:00
Robert Schuppenies
51df064767
Issue #2898 : Added sys.getsizeof() to retrieve size of objects in bytes.
2008-06-01 16:16:17 +00:00
Christian Heimes
593daf545b
Renamed PyString to PyBytes
2008-05-26 12:51:38 +00:00
Benjamin Peterson
f19a7b90bd
A little reformating of Py3k warnings
2008-04-27 18:40:21 +00:00
Benjamin Peterson
9f4f48114f
Use PyErr_WarnPy3k throughout
2008-04-27 03:01:45 +00:00
Georg Brandl
d5b635f196
Make Py3k warnings consistent w.r.t. punctuation; also respect the
...
EOL 80 limit and supply more alternatives in warning messages.
2008-03-25 08:29:14 +00:00
Raymond Hettinger
05387861ea
Issue 2354: Fix-up compare warning. Patch contributed by Jeff Balogh.
2008-03-19 17:45:19 +00:00
Raymond Hettinger
6c0ff8aacd
Issue: 2354: Add 3K warning for the cmp argument to list.sort() and sorted().
2008-03-18 23:33:08 +00:00
Christian Heimes
09bde04154
Use PY_FORMAT_SIZE_T instead of z for string formatting. Thanks Neal.
2008-02-24 12:26:16 +00:00
Christian Heimes
48397d6c22
Use prefix decrement
2008-02-08 00:14:34 +00:00
Christian Heimes
b4ee4a16f4
Added some statistics code to dict and list object code. I wanted to test how a larger freelist affects the reusage of freed objects. Contrary to my gut feelings 80 objects is more than fine for small apps. I haven't profiled a large app yet.
2008-02-07 17:15:30 +00:00
Christian Heimes
5b970ad483
Unified naming convention for free lists and their limits. All free lists
...
in Object/ are named ``free_list``, the counter ``numfree`` and the upper
limit is a macro ``PyName_MAXFREELIST`` inside an #ifndef block.
The chances should make it easier to adjust Python for platforms with
less memory, e.g. mobile phones.
2008-02-06 13:33:44 +00:00
Thomas Wouters
a97744c9d9
Use the right (portable) definition of the max of a Py_ssize_t.
2008-01-25 21:09:34 +00:00
Guido van Rossum
8d5cf4ed57
Rewrite the list_inline_repeat overflow check slightly differently.
2008-01-25 19:50:26 +00:00
Christian Heimes
e93237dfcc
#1629 : Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available.
2007-12-19 02:37:44 +00:00
Raymond Hettinger
6c87af5d87
Optimize PyList_AsTuple(). Improve cache performance by doing the
...
pointer copy and object increment in one pass. For small lists,
save the overhead of the call to memcpy() -- this comes up in
calls like f(*listcomp).
2007-12-15 00:07:25 +00:00
Raymond Hettinger
4e2f714031
Fix Issue 1045.
...
Factor-out common calling code by simplifying the length_hint API.
Speed-up the function by caching the PyObject_String for the attribute lookup.
2007-12-06 00:56:53 +00:00
Christian Heimes
fe4826f6ac
merge -r59315:59316 from py3k: Fix issue #1553 : An errornous __length_hint__ can make list() raise a SystemError
2007-12-05 12:49:14 +00:00
Guido van Rossum
64c06e327d
Backport of _abccoll.py by Benjamin Arangueren, issue 1383.
...
With some changes of my own thrown in (e.g. backport of r58107).
2007-11-22 00:55:51 +00:00