Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | 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 |
| | |||||
* | Add example | Andrew M. Kuchling | 2005-08-02 | 1 | -2/+14 |
| | |||||
* | Add note | Andrew M. Kuchling | 2005-08-02 | 1 | -0/+14 |
| | |||||
* | [ 1243192 ] Incorrect documentation of re.UNICODE | Georg Brandl | 2005-08-02 | 2 | -12/+31 |
| | |||||
* | Model set.pop() after dict.popitem(). | Raymond Hettinger | 2005-08-02 | 2 | -12/+34 |
| | |||||
* | Minor tweak as a side effect of fixing #1243553. The Unicode name for " is | Skip Montanaro | 2005-08-02 | 1 | -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 ref | Skip Montanaro | 2005-08-02 | 1 | -1/+3 |
| | | | | manual. Closes #1243553. | ||||
* | PEP 342 implementation. Per Guido's comments, the generator throw() | Phillip J. Eby | 2005-08-02 | 16 | -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 Hettinger | 2005-08-01 | 5 | -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 definition | Hye-Shik Chang | 2005-08-01 | 1 | -1/+1 |
| | | | | part also. | ||||
* | Improve variable names. | Raymond Hettinger | 2005-07-31 | 1 | -154/+154 |
| | |||||
* | Fix frozenset() ref count and a comment typo. | Raymond Hettinger | 2005-07-31 | 1 | -3/+2 |
| | |||||
* | Comment on the set_swap_bodies() helper function. | Raymond Hettinger | 2005-07-31 | 1 | -0/+13 |
| | |||||
* | Revised the set() and frozenset() implementaion to use its own internal | Raymond Hettinger | 2005-07-31 | 3 | -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 versions | Fred Drake | 2005-07-29 | 2 | -4/+8 |
| | | | | (closes SF bug #1238210) | ||||
* | add support for svn: and svn+ssh: URL schemes to urlparse | Fred Drake | 2005-07-29 | 2 | -1/+7 |
| | |||||
* | Documentation added about changes in 2.4 to basicConfig(), including ↵ | Vinay Sajip | 2005-07-29 | 1 | -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örwald | 2005-07-28 | 1 | -19/+20 |
| | |||||
* | Fix a typo. (found by Jong-uk Kim) | Hye-Shik Chang | 2005-07-28 | 1 | -1/+1 |
| | |||||
* | This is barry-scott's patch: | Michael W. Hudson | 2005-07-27 | 2 | -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 Hettinger | 2005-07-27 | 1 | -0/+2 |
| | |||||
* | Ouch, move that comment to the right place. | Guido van Rossum | 2005-07-27 | 1 | -4/+4 |
| | |||||
* | Fix a problem in Tkinter introduced by SF patch #869468 (checked in as | Guido van Rossum | 2005-07-26 | 2 | -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 Mick | 2005-07-26 | 3 | -14/+17 |
| | |||||
* | That was one too much. | Georg Brandl | 2005-07-22 | 1 | -1/+1 |
| |