Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | SF bug #1168135: Python 2.5a0 Tutorial errors and observations | Raymond Hettinger | 2005-08-21 | 1 | -16/+13 |
| | | | | (Contributed by Michael R Bax.) | ||||
* | Empty sets and frozensets are also false. | Georg Brandl | 2005-08-21 | 1 | -3/+3 |
| | |||||
* | SF bug #1121416: zip incorrectly and incompletely documented | Raymond Hettinger | 2005-08-21 | 1 | -4/+4 |
| | | | | sequences ==> iterables | ||||
* | SF bug #1249837: container methods raise KeyError not IndexError | Raymond Hettinger | 2005-08-21 | 1 | -0/+2 |
| | | | | Minor clarification. | ||||
* | SF bug #1242657: list(obj) can swallow KeyboardInterrupt | Raymond Hettinger | 2005-08-21 | 4 | -0/+31 |
| | | | | | | Fix over-aggressive PyErr_Clear(). The same code fragment appears in various guises in list.extend(), map(), filter(), zip(), and internally in PySequence_Tuple(). | ||||
* | Mention explicitly the False is considered false. | Georg Brandl | 2005-08-21 | 1 | -3/+3 |
| | |||||
* | Fix PySet_Pop() notes. | Raymond Hettinger | 2005-08-21 | 1 | -2/+1 |
| | |||||
* | Add info about the set API. | Raymond Hettinger | 2005-08-20 | 1 | -0/+19 |
| | |||||
* | Implement random.sample() using sets instead of dicts. | Raymond Hettinger | 2005-08-19 | 1 | -9/+13 |
| | |||||
* | Typo fix | Andrew M. Kuchling | 2005-08-18 | 1 | -1/+1 |
| | |||||
* | Fix markup. | Raymond Hettinger | 2005-08-18 | 1 | -1/+1 |
| | |||||
* | Fix typo (fixes SF bug #1263086). | Walter Dörwald | 2005-08-18 | 1 | -1/+1 |
| | |||||
* | Add shortcuts for a|a and a&a. | Raymond Hettinger | 2005-08-17 | 1 | -8/+9 |
| | |||||
* | Expand the API notes. | Raymond Hettinger | 2005-08-17 | 1 | -4/+5 |
| | |||||
* | Note that the PyNumber protocol can access most set methods directly. | Raymond Hettinger | 2005-08-17 | 1 | -3/+10 |
| | |||||
* | Fix nits. | Raymond Hettinger | 2005-08-17 | 1 | -2/+2 |
| | |||||
* | Results of a line-by-line comparison back to dictobject.c. | Raymond Hettinger | 2005-08-17 | 1 | -127/+121 |
| | | | | | | | | | | | | * set_merge() cannot assume that the table doesn't resize during iteration. * convert some unnecessary tests to asserts -- they were necessary in dictobject.c because PyDict_Next() is a public function. The same is not true for set_next(). * re-arrange the order of functions to more closely match the order in dictobject.c. This makes it must easier to compare the two and ought to simplify any issues of maintaining both. | ||||
* | Numerous fix-ups to C API and docs. Added tests for C API. | Raymond Hettinger | 2005-08-16 | 4 | -26/+148 |
| | |||||
* | DECREF --> XDECREF | Raymond Hettinger | 2005-08-16 | 1 | -1/+1 |
| | |||||
* | Add a C API for sets and frozensets. | Raymond Hettinger | 2005-08-16 | 5 | -12/+210 |
| | |||||
* | Port from the Python 2.4 branch, patches for SF bug # 900092, | Barry Warsaw | 2005-08-15 | 3 | -8/+18 |
| | | | | hotshot.stats.load. | ||||
* | Correct definition of ST_GEN_IDX. | Martin v. Löwis | 2005-08-14 | 1 | -2/+2 |
| | |||||
* | More function re-ordering (placing like functions together). | Raymond Hettinger | 2005-08-13 | 1 | -86/+86 |
| | |||||
* | * Bring lookkey() and lookkey_string() closer to dict version. | Raymond Hettinger | 2005-08-13 | 1 | -93/+77 |
| | | | | | * Use set_next() for looping in issubset() and frozenset_hash(). * Re-order the presentation of cmp and hash functions. | ||||
* | Fix a too-aggressive assert (see SF#1257960). Previously, gen_iternext | Phillip J. Eby | 2005-08-13 | 1 | -1/+1 |
| | | | | | | | | | was never called during interpreter shutdown GC, so the f_back!=NULL assertion was correct. Now that generators get close()d during GC, the assertion was being triggered because the generator close() was being called as the top-level frame. However, nothing actually is broken by this; it's just that the condition was unexpected in previous Python versions. | ||||
* | Teach the sets module to correctly compute s-=s and s^=s as the empty set. | Raymond Hettinger | 2005-08-13 | 2 | -0/+17 |
| | |||||
* | Fix pystack command. | Neil Schemenauer | 2005-08-13 | 1 | -1/+1 |
| | |||||
* | * Fix SF #1257731. Make __contains__(), remove(), and discard() only do | Raymond Hettinger | 2005-08-12 | 1 | -0/+13 |
| | | | | | | | a frozenset conversion when the initial search attempt fails with a TypeError and the key is some type of set. Add a testcase. * Eliminate a duplicate if-stmt. | ||||
* | * Fix SF #1257731. Make __contains__(), remove(), and discard() only do | Raymond Hettinger | 2005-08-12 | 1 | -26/+30 |
| | | | | | | | a frozenset conversion when the initial search attempt fails with a TypeError and the key is some type of set. Add a testcase. * Eliminate a duplicate if-stmt. | ||||
* | Change the %s format specifier for str objects so that it returns a | Neil Schemenauer | 2005-08-12 | 5 | -17/+42 |
| | | | | | unicode instance if the argument is not an instance of basestring and calling __str__ on the argument returns a unicode instance. | ||||
* | Document 'istext' parameter | Andrew M. Kuchling | 2005-08-12 | 1 | -2/+5 |
| | |||||
* | * Add short-circuit code for in-place operations with self (such as | Raymond Hettinger | 2005-08-11 | 2 | -89/+165 |
| | | | | | | | | | | | | | | | | | | | | | s|=s, s&=s, s-=s, or s^=s). Add related tests. * Improve names for several variables and functions. * Provide alternate table access functions (next, contains, add, and discard) that work with an entry argument instead of just a key. This improves set-vs-set operations because we already have a hash value for each key and can avoid unnecessary calls to PyObject_Hash(). Provides a 5% to 20% speed-up for quick hashing elements like strings and integers. Provides much more substantial improvements for slow hashing elements like tuples or objects defining a custom __hash__() function. * Have difference operations resize() when 1/5 of the elements are dummies. Formerly, it was 1/6. The new ratio triggers less frequently and only in cases that it can resize quicker and with greater benefit. The right answer is probably either 1/4, 1/5, or 1/6. Picked the middle value for an even trade-off between resize time and the space/time costs of dummy entries. | ||||
* | fix minor markup errors | Fred Drake | 2005-08-09 | 1 | -3/+3 |
| | |||||
* | Patch #1180695: Implement nanosecond stat resolution on FreeBSD, | Martin v. Löwis | 2005-08-09 | 6 | -1/+373 |
| | | | | add st_gen, st_birthtime. | ||||
* | Patch #1239112: Correct LINKCC C++ test. Fixes #1189330. | Martin v. Löwis | 2005-08-07 | 3 | -7/+14 |
| | | | | Backported to 2.4. | ||||
* | Patch #827386: Support absolute source paths in msvccompiler.py. | Martin v. Löwis | 2005-08-07 | 2 | -0/+4 |
| | | | | Backported to 2.4. | ||||
* | * Bring in INIT_NONZERO_SET_SLOTS macro from dictionary code. | Raymond Hettinger | 2005-08-07 | 2 | -19/+56 |
| | | | | | | | | * Bring in free list from dictionary code. * Improve several comments. * Differencing can leave many dummy entries. If more than 1/6 are dummies, then resize them away. * Factor-out common code with new macro, PyAnySet_CheckExact. | ||||
* | Whitespace normalization (ran reindent.py over the whole tree). | Tim Peters | 2005-08-07 | 1 | -10/+10 |
| | |||||
* | Removed XXX block about a test_bsddb3 failure that went away a long time ago. | Tim Peters | 2005-08-07 | 1 | -11/+0 |
| | |||||
* | Update some Python version numbers. | Tim Peters | 2005-08-07 | 1 | -3/+3 |
| | |||||
* | * Removed checked_error flag which no longer provides any benefit. | Raymond Hettinger | 2005-08-06 | 1 | -15/+12 |
| | | | | * Have issubset() control its own loop instead of using set_next_internal(). | ||||
* | * set_new() doesn't need to zero the structure a second time after tp_alloc | Raymond Hettinger | 2005-08-06 | 2 | -3/+12 |
| | | | | | has already done the job. * Use a macro form of PyErr_Occurred() inside the set_lookkey() function. | ||||
* | Factor away a redundant clear() function. | Raymond Hettinger | 2005-08-06 | 1 | -13/+6 |
| | |||||
* | bug [ 1252706 ] poplib list() docstring fix (and docs too) | Georg Brandl | 2005-08-05 | 2 | -3/+3 |
| | |||||
* | * Improve a variable name: entry0 --> table. | Raymond Hettinger | 2005-08-05 | 1 | -39/+58 |
| | | | | | | | | | | * Give set_lookkey_string() a fast alternate path when no dummy entries are present. * Have set_swap_bodies() reset the hash field to -1 whenever either of bodies is not a frozenset. Maintains the invariant of regular sets always having -1 in the hash field; otherwise, any mutation would make the hash value invalid. * Use an entry pointer to simplify the code in frozenset_hash(). | ||||
* | * Move copyright notice to top and indicate derivation from sets.py and | Raymond Hettinger | 2005-08-05 | 1 | -22/+17 |
| | | | | | | | dictobject.c. * Have frozenset_hash() use entry->hash instead of re-computing each individual hash with PyObject_Hash(o); * Finalize the dummy entry before a system exit. | ||||
* | com_yield_expr(): Squash new compiler wng about unreferenced local. | Tim Peters | 2005-08-03 | 1 | -1/+0 |
| | |||||
* | Disable a few other tests, that can't work if Python is compiled without | Walter Dörwald | 2005-08-03 | 4 | -18/+30 |
| | | | | Unicode support. | ||||
* | patch [ 1105730 ] Faster commonprefix in macpath, ntpath, etc. | Georg Brandl | 2005-08-03 | 5 | -41/+35 |
| | |||||
* | bug [ 1250306 ] incorrect description of range function | Georg Brandl | 2005-08-03 | 1 | -1/+1 |
| |