summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* SF bug #1168135: Python 2.5a0 Tutorial errors and observationsRaymond Hettinger2005-08-211-16/+13
| | | | (Contributed by Michael R Bax.)
* Empty sets and frozensets are also false.Georg Brandl2005-08-211-3/+3
|
* SF bug #1121416: zip incorrectly and incompletely documentedRaymond Hettinger2005-08-211-4/+4
| | | | sequences ==> iterables
* SF bug #1249837: container methods raise KeyError not IndexErrorRaymond Hettinger2005-08-211-0/+2
| | | | Minor clarification.
* SF bug #1242657: list(obj) can swallow KeyboardInterruptRaymond Hettinger2005-08-214-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 Brandl2005-08-211-3/+3
|
* Fix PySet_Pop() notes.Raymond Hettinger2005-08-211-2/+1
|
* Add info about the set API.Raymond Hettinger2005-08-201-0/+19
|
* Implement random.sample() using sets instead of dicts.Raymond Hettinger2005-08-191-9/+13
|
* Typo fixAndrew M. Kuchling2005-08-181-1/+1
|
* Fix markup.Raymond Hettinger2005-08-181-1/+1
|
* Fix typo (fixes SF bug #1263086).Walter Dörwald2005-08-181-1/+1
|
* Add shortcuts for a|a and a&a.Raymond Hettinger2005-08-171-8/+9
|
* Expand the API notes.Raymond Hettinger2005-08-171-4/+5
|
* Note that the PyNumber protocol can access most set methods directly.Raymond Hettinger2005-08-171-3/+10
|
* Fix nits.Raymond Hettinger2005-08-171-2/+2
|
* Results of a line-by-line comparison back to dictobject.c.Raymond Hettinger2005-08-171-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 Hettinger2005-08-164-26/+148
|
* DECREF --> XDECREFRaymond Hettinger2005-08-161-1/+1
|
* Add a C API for sets and frozensets.Raymond Hettinger2005-08-165-12/+210
|
* Port from the Python 2.4 branch, patches for SF bug # 900092,Barry Warsaw2005-08-153-8/+18
| | | | hotshot.stats.load.
* Correct definition of ST_GEN_IDX.Martin v. Löwis2005-08-141-2/+2
|
* More function re-ordering (placing like functions together).Raymond Hettinger2005-08-131-86/+86
|
* * Bring lookkey() and lookkey_string() closer to dict version.Raymond Hettinger2005-08-131-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_iternextPhillip J. Eby2005-08-131-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 Hettinger2005-08-132-0/+17
|
* Fix pystack command.Neil Schemenauer2005-08-131-1/+1
|
* * Fix SF #1257731. Make __contains__(), remove(), and discard() only doRaymond Hettinger2005-08-121-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 doRaymond Hettinger2005-08-121-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 aNeil Schemenauer2005-08-125-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' parameterAndrew M. Kuchling2005-08-121-2/+5
|
* * Add short-circuit code for in-place operations with self (such asRaymond Hettinger2005-08-112-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 errorsFred Drake2005-08-091-3/+3
|
* Patch #1180695: Implement nanosecond stat resolution on FreeBSD,Martin v. Löwis2005-08-096-1/+373
| | | | add st_gen, st_birthtime.
* Patch #1239112: Correct LINKCC C++ test. Fixes #1189330.Martin v. Löwis2005-08-073-7/+14
| | | | Backported to 2.4.
* Patch #827386: Support absolute source paths in msvccompiler.py.Martin v. Löwis2005-08-072-0/+4
| | | | Backported to 2.4.
* * Bring in INIT_NONZERO_SET_SLOTS macro from dictionary code.Raymond Hettinger2005-08-072-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 Peters2005-08-071-10/+10
|
* Removed XXX block about a test_bsddb3 failure that went away a long time ago.Tim Peters2005-08-071-11/+0
|
* Update some Python version numbers.Tim Peters2005-08-071-3/+3
|
* * Removed checked_error flag which no longer provides any benefit.Raymond Hettinger2005-08-061-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_allocRaymond Hettinger2005-08-062-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 Hettinger2005-08-061-13/+6
|
* bug [ 1252706 ] poplib list() docstring fix (and docs too)Georg Brandl2005-08-052-3/+3
|
* * Improve a variable name: entry0 --> table.Raymond Hettinger2005-08-051-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 andRaymond Hettinger2005-08-051-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 Peters2005-08-031-1/+0
|
* Disable a few other tests, that can't work if Python is compiled withoutWalter Dörwald2005-08-034-18/+30
| | | | Unicode support.
* patch [ 1105730 ] Faster commonprefix in macpath, ntpath, etc.Georg Brandl2005-08-035-41/+35
|
* bug [ 1250306 ] incorrect description of range functionGeorg Brandl2005-08-031-1/+1
|