Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | * Beef-up testing of str.__contains__() and str.find(). | Raymond Hettinger | 2005-02-20 | 2 | -13/+50 |
| | | | | | | | | | | | | | | | | | | | * Speed-up "x in y" where x has more than one character. The existing code made excessive calls to the expensive memcmp() function. The new code uses memchr() to rapidly find a start point for memcmp(). In addition to knowing that the first character is a match, the new code also checks that the last character is a match. This significantly reduces the incidence of false starts (saving memcmp() calls and making quadratic behavior less likely). Improves the timings on: python -m timeit -r7 -s"x='a'*1000" "'ab' in x" python -m timeit -r7 -s"x='a'*1000" "'bc' in x" Once this code has proven itself, then string_find_internal() should refer to it rather than running its own version. Also, something similar may apply to unicode objects. | ||||
* | The error message "can't start new thread" should not end in a | Guido van Rossum | 2005-02-20 | 1 | -1/+1 |
| | | | | newline. | ||||
* | Use getdoc(object) instead of object.__doc__ to fix indentation problems. | Ka-Ping Yee | 2005-02-19 | 1 | -2/+10 |
| | | | | | | | | | | | Thanks to Robert Dick <dickrp@ece.northwestern.edu> for reporting this bug and submitting a patch. Adjust doc(object) to display useful documentation for plain values (e.g. help([]) now shows the methods on the list instead of just printing "[]"). (This change has been tested interactively, by generating docs for the standard library, and by running the module documentation webserver.) | ||||
* | Avoid using *W functions on Win95. Backported to 2.4. | Martin v. Löwis | 2005-02-18 | 1 | -11/+24 |
| | |||||
* | Add support for negative indices in UserString.MutableString.__setitem__ | Walter Dörwald | 2005-02-18 | 3 | -7/+14 |
| | | | | and UserString.MutableString.__delitem__. | ||||
* | Handle errors in imports of thread, threading | Vinay Sajip | 2005-02-18 | 1 | -1/+7 |
| | |||||
* | Improved frame handling for 1.5.2, and now return func from findCaller (not ↵ | Vinay Sajip | 2005-02-18 | 1 | -9/+20 |
| | | | | actually used yet) | ||||
* | Fixed documentation for SMTPHandler | Vinay Sajip | 2005-02-18 | 1 | -2/+1 |
| | |||||
* | Fix copy & paste error. | Walter Dörwald | 2005-02-17 | 1 | -2/+2 |
| | |||||
* | Add tests for the methods added by UserString.MutableString. | Walter Dörwald | 2005-02-17 | 1 | -0/+62 |
| | |||||
* | Avoid using items() in environ.update(). Fixes #1124513. | Martin v. Löwis | 2005-02-17 | 2 | -9/+19 |
| | | | | Will backport to 2.4. | ||||
* | Add a basic test for UserString.MutableString. | Walter Dörwald | 2005-02-17 | 1 | -2/+9 |
| | |||||
* | NEWS blurb for fix of: | Michael W. Hudson | 2005-02-17 | 1 | -0/+3 |
| | | | | [ 1124295 ] Function's __name__ no longer accessible in restricted mode | ||||
* | update version numbers | Andrew MacIntyre | 2005-02-17 | 1 | -23/+23 |
| | |||||
* | add notes about subprocess module & thread stacks, SSL support | Andrew MacIntyre | 2005-02-17 | 1 | -1/+18 |
| | |||||
* | add build machinery for the SSL socket module | Andrew MacIntyre | 2005-02-17 | 1 | -0/+8 |
| | |||||
* | Fix | Michael W. Hudson | 2005-02-17 | 2 | -2/+3 |
| | | | | | | | | [ 1124295 ] Function's __name__ no longer accessible in restricted mode which I introduced with a bit of mindless copy-paste when making __name__ writable. You can't assign to __name__ in restricted mode, which I'm going to pretend was intentional :) | ||||
* | Fix name for PyDateTime_FromDateAndTime. | Brett Cannon | 2005-02-17 | 1 | -1/+1 |
| | | | | Closes bug #1124278. | ||||
* | Remove dependency on order of mode flags | Raymond Hettinger | 2005-02-16 | 1 | -1/+1 |
| | |||||
* | spwdmodule.c should only be built when either HAVE_GETSPNAM or HAVE_GETSPENT is | Brett Cannon | 2005-02-16 | 2 | -2/+7 |
| | | | | defined. | ||||
* | Whitespace normalization. | Tim Peters | 2005-02-15 | 1 | -2/+2 |
| | |||||
* | An instance of class PicklingError was used here simply as an example of | Tim Peters | 2005-02-15 | 1 | -21/+26 |
| | | | | | | | _some_ user-defined class instance. That it was also an exception isn't interesting, but does interfere with Michael Hudson's new-style exception patch. This just changes the doctest example, to use an instance of a non-exception class. | ||||
* | Test that SystemExits are handled properly by the exit machinery. I | Michael W. Hudson | 2005-02-15 | 1 | -0/+12 |
| | | | | | broke the "raise SystemExit(46)" case when doing new-style exceptions, but I'd much rather have found out here than in test_tempfile (growl). | ||||
* | Exceedingly minor tweak. | Michael W. Hudson | 2005-02-15 | 1 | -1/+1 |
| | |||||
* | Added copyright notice: | Peter Astrand | 2005-02-14 | 1 | -0/+2 |
| | | | | Licensed to PSF under a Contributor Agreement. | ||||
* | Add mention of patch #1095802 (fixing "Macintosh" references to represent OS | Brett Cannon | 2005-02-13 | 1 | -0/+8 |
| | | | | X). | ||||
* | Update references specifying "Macintosh" to mean OS X semantics and not Mac OS | Brett Cannon | 2005-02-13 | 17 | -622/+191 |
| | | | | | | 9. Applies patch #1095802. Thanks Jack Jansen. | ||||
* | fix decoding in _stringify to not depend on the default encoding | Fred Drake | 2005-02-11 | 2 | -1/+43 |
| | | | | (closes SF bug #1115989) | ||||
* | Modified test for tzset to not rely on tm->tm_zone's existence. Also added | Brett Cannon | 2005-02-10 | 4 | -220/+677 |
| | | | | | | sanity checks on tzname if HAVE_TZNAME defined. Closes bug #1096244. Thanks Gregory Bond. | ||||
* | Remove set conversion optimization test (backed out of Python/compile.c in rev. | Brett Cannon | 2005-02-10 | 1 | -11/+0 |
| | | | | 2.344). | ||||
* | accept datetime.datetime instances when marshalling; | Fred Drake | 2005-02-10 | 2 | -1/+33 |
| | | | | dateTime.iso8601 elements still unmarshal into xmlrpclib.DateTime objects | ||||
* | Fix typo | Andrew M. Kuchling | 2005-02-10 | 2 | -2/+2 |
| | |||||
* | Patch from Leandro Lucarella: replaced: | Peter Astrand | 2005-02-10 | 1 | -29/+29 |
| | | | | | | | | | | | | var == None and var != None with var is None and var is not None and type(var) == int with instanceof(var, int) ...as recomended in PEP 8 [1]. | ||||
* | Remove the set conversion which didn't work with: [] in (0,) | Raymond Hettinger | 2005-02-10 | 1 | -53/+1 |
| | |||||
* | SF bug #1119700: list extend() accepts args besides lists | Raymond Hettinger | 2005-02-09 | 1 | -1/+1 |
| | |||||
* | Have set conversion replace existing constant if not used elsewhere. | Raymond Hettinger | 2005-02-09 | 1 | -1/+7 |
| | |||||
* | Update PSF copyright year to 2005. | Trent Mick | 2005-02-09 | 1 | -1/+1 |
| | |||||
* | Convert splitlines to for-loop (handles case where input does not have a ↵ | Raymond Hettinger | 2005-02-08 | 1 | -4/+4 |
| | | | | trailing newline). | ||||
* | Fix stupid typo: Don't read from a writer. | Walter Dörwald | 2005-02-08 | 1 | -2/+2 |
| | |||||
* | Wholistic code cleanup / modernization: | Raymond Hettinger | 2005-02-08 | 1 | -75/+63 |
| | | | | | | | | * Use += * Replace loop logic with str.splitlines equivalent * Don't use variable names that shadow tuple, list, and str * Use dict.get instead of equivalent try/except * Minor loop logic simplications | ||||
* | add 2.3.5, 2.4 to the history and licensing info | Fred Drake | 2005-02-08 | 1 | -0/+2 |
| | |||||
* | Close the discussion in SF bug 1069160. | Guido van Rossum | 2005-02-08 | 1 | -1/+3 |
| | |||||
* | Adopt Skip's idea to optimize lists of constants in the context | Raymond Hettinger | 2005-02-07 | 2 | -8/+15 |
| | | | | of a "in" or "not in" test. | ||||
* | Revert previous checkin. | Raymond Hettinger | 2005-02-07 | 2 | -34/+34 |
| | |||||
* | Reduce the usage of the types module. | Raymond Hettinger | 2005-02-07 | 8 | -68/+64 |
| | |||||
* | Transform "x in (1,2,3)" to "x in frozenset([1,2,3])". | Raymond Hettinger | 2005-02-06 | 2 | -1/+58 |
| | | | | | Inspired by Skip's idea to recognize the throw-away nature of sequences in this context and to transform their type to one with better performance. | ||||
* | Replace list of constants with tuples of constants. | Raymond Hettinger | 2005-02-06 | 11 | -29/+29 |
| | |||||
* | Code simplification -- eliminate lookup when value is known in advance. | Raymond Hettinger | 2005-02-05 | 1 | -2/+4 |
| | |||||
* | SF patch #1028908 | Raymond Hettinger | 2005-02-05 | 1 | -3/+6 |
| | | | | | | (John J Lee) Minor code clarification and simplification. | ||||
* | SF patch #1116583: NameError in cookielib domain check | Raymond Hettinger | 2005-02-05 | 3 | -4/+6 |
| |