summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Add exampleAndrew M. Kuchling2005-08-021-2/+14
|
* Add noteAndrew M. Kuchling2005-08-021-0/+14
|
* [ 1243192 ] Incorrect documentation of re.UNICODEGeorg Brandl2005-08-022-12/+31
|
* Model set.pop() after dict.popitem().Raymond Hettinger2005-08-022-12/+34
|
* Minor tweak as a side effect of fixing #1243553. The Unicode name for " isSkip Montanaro2005-08-021-1/+1
| | | | 'quotation mark', so I decided to use it instead of 'double-quote'.
* Bring cgi.escape docstring slightly more in line with the library refSkip Montanaro2005-08-021-1/+3
| | | | manual. Closes #1243553.
* PEP 342 implementation. Per Guido's comments, the generator throw()Phillip J. Eby2005-08-0216-165/+785
| | | | | method still needs to support string exceptions, and allow None for the third argument. Documentation updates are needed, too.
* * Improve code for the empty frozenset singleton:Raymond Hettinger2005-08-015-65/+89
| | | | | | | | | | | - Handle both frozenset() and frozenset([]). - Do not use singleton for frozenset subclasses. - Finalize the singleton. - Add test cases. * Factor-out set_update_internal() from set_update(). Simplifies the code for several internal callers. * Factor constant expressions out of loop in set_merge_internal(). * Minor comment touch-ups.
* Fix build on gcc: PySetIter_Type should be static in definitionHye-Shik Chang2005-08-011-1/+1
| | | | part also.
* Improve variable names.Raymond Hettinger2005-07-311-154/+154
|
* Fix frozenset() ref count and a comment typo.Raymond Hettinger2005-07-311-3/+2
|
* Comment on the set_swap_bodies() helper function.Raymond Hettinger2005-07-311-0/+13
|
* Revised the set() and frozenset() implementaion to use its own internalRaymond Hettinger2005-07-313-224/+912
| | | | | data structure instead of using dictionaries. Reduces memory consumption by 1/3 and provides modest speed-ups for most set operations.
* use a test for PDF support that is more portable across teTeX major versionsFred Drake2005-07-292-4/+8
| | | | (closes SF bug #1238210)
* add support for svn: and svn+ssh: URL schemes to urlparseFred Drake2005-07-292-1/+7
|
* Documentation added about changes in 2.4 to basicConfig(), including ↵Vinay Sajip2005-07-291-1/+23
| | | | documentation of the keyword arguments. A version change note was also added to the basic example.
* Disable encoding/decoding test, if unicode is disabled.Walter Dörwald2005-07-281-19/+20
|
* Fix a typo. (found by Jong-uk Kim)Hye-Shik Chang2005-07-281-1/+1
|
* This is barry-scott's patch:Michael W. Hudson2005-07-272-3/+7
| | | | | | | | [ 1231069 ] ioctl has problem with -ive request codes by using the 'I' not the 'i' format code to PyArg_ParseTuple(). Backport candidate? Maybe...
* Update permissions for Johannes Gijsbers.Raymond Hettinger2005-07-271-0/+2
|
* Ouch, move that comment to the right place.Guido van Rossum2005-07-271-4/+4
|
* Fix a problem in Tkinter introduced by SF patch #869468 (checked in asGuido van Rossum2005-07-262-6/+4
| | | | | 1.179): delete bogus __hasattr__ and __delattr__ methods on class Tk that were breaking Tkdnd.
* Upgrade Windows build to zlib 1.2.3 (a security fix)Trent Mick2005-07-263-14/+17
|
* That was one too much.Georg Brandl2005-07-221-1/+1
|