summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Keep the list.pop() optimization while restoring the many possibilityRaymond Hettinger2004-02-191-4/+2
| | | | | for types other than PyInt being accepted for the optional argument. (Spotted by Neal Norwitz.)
* Remove gcc warning from using "main". Use METH_NOARGS instead of METH_VARARGSNeal Norwitz2004-02-191-5/+3
|
* Get test to work when run from regrtest (add test_main), remove all CRs (^M)sNeal Norwitz2004-02-191-3/+5
|
* Implementation of patch 869468David Ascher2004-02-185-16/+264
| | | | | | | | | | | | | | | Allow the user to create Tkinter.Tcl objects which are just like Tkinter.Tk objects except that they do not initialize Tk. This is useful in circumstances where the script is being run on machines that do not have an X server running -- in those cases, Tk initialization fails, even if no window is ever created. Includes documentation change and tests. Tested on Linux, Solaris and Windows. Reviewed by Martin von Loewis.
* commentary about how bad ConfigParser is doesn't help here, and theFred Drake2004-02-171-3/+1
| | | | | suggested approach to dealing with it isn't a good one; we need a better general purpose config reader, not a distutils-specific reader
* Oops. Return -1 to distinguish error from empty dict.Jeremy Hylton2004-02-171-1/+1
| | | | | This change probably isn't work a bug fix. It's unlikely that anyone was calling this method without passing it a real dict.
* Double the speed of list.pop() which was spending most of its time parsingRaymond Hettinger2004-02-171-2/+11
| | | | arguments.
* Mention the optimization of list.extend().Raymond Hettinger2004-02-171-0/+2
|
* markup correctionFred Drake2004-02-171-1/+1
|
* Make socketmodule compile again on a modern Linux (that supports Bluetooth).Anthony Baxter2004-02-161-1/+1
| | | | The Bluetooth code was obviously never tested on Linux.
* Fix docstrings to mention the correct functionNeal Norwitz2004-02-161-2/+2
|
* Patch #892673: Replace /usr/local/bin/python withMartin v. Löwis2004-02-151-1/+38
| | | | | /usr/bin/env python'%{binsuffix} Backported to 2.3.
* Patch #711838: Allow non-anonymous ftp urls in urllib2.Martin v. Löwis2004-02-152-6/+17
| | | | Backported to 2.3.
* Patch #893566: Document that tp_dealloc may be called from any thread.Martin v. Löwis2004-02-151-0/+10
|
* Patch #817379: Allow for absolute ftp paths.Martin v. Löwis2004-02-151-1/+1
| | | | Backported to 2.3.
* Fix typo.Neil Schemenauer2004-02-151-1/+1
|
* * Moved the responsibility for emptying the previous list from list_fillRaymond Hettinger2004-02-151-0/+5
| | | | | | | | | | | | | | | | | | | | | to list_init. * Replaced the code in list_extend with the superior code from list_fill. * Eliminated list_fill. Results: * list.extend() no longer creates an intermediate tuple except to handle the special case of x.extend(x). The saves memory and time. * list.extend(x) runs about the same x is a list or tuple, a little faster when x is an iterable not defining __len__, and twice as fast when x is an iterable defining __len__. * the code is about 15 lines shorter and no longer duplicates functionality.
* Refactor list_extend() and list_fill() for gains in code size, memoryRaymond Hettinger2004-02-151-84/+71
| | | | | | | | | | | | | | | | | | | | | | | | utilization, and speed: * Moved the responsibility for emptying the previous list from list_fill to list_init. * Replaced the code in list_extend with the superior code from list_fill. * Eliminated list_fill. Results: * list.extend() no longer creates an intermediate tuple except to handle the special case of x.extend(x). The saves memory and time. * list.extend(x) runs 5 to 10% faster when x is a list or tuple 15% faster when x is an iterable not defining __len__ twice as fast when x is an iterable defining __len__ * the code is about 15 lines shorter and no longer duplicates functionality.
* Fine tune the speed/space trade-off for overallocating small lists.Raymond Hettinger2004-02-143-12/+7
| | | | | | | | | | | | | | The Py2.3 approach overallocated small lists by up to 8 elements. The last checkin would limited this to one but slowed down (by 20 to 30%) the creation of small lists between 3 to 8 elements. This tune-up balances the two, limiting overallocation to 3 elements (significantly reducing space consumption from Py2.3) and running faster than the previous checkin. The first part of the growth pattern (0, 4, 8, 16) neatly meshes with allocators that trigger data movement only when crossing a power of two boundary. Also, then even numbers mesh well with common data alignments.
* Fix missing return value. Spotted by Neal NorwitzRaymond Hettinger2004-02-141-0/+1
|
* - Fixing annoying warnings.Gustavo Niemeyer2004-02-142-9/+12
|
* - Fixed #853061: allow BZ2Compressor.compress() to receive an empty stringGustavo Niemeyer2004-02-142-0/+6
| | | | as parameter.
* Lists are measured in elements not bytes.Raymond Hettinger2004-02-131-2/+2
|
* further testing indicates that the simplified version of the testFred Drake2004-02-131-4/+6
| | | | | | | | | | (re-using an existing test object class) no longer triggered the original segfault when the fix was backed out; restoring the local test object class to make the test effective the assignment of the ref created at the end does not affect the test, since the segfault happended before weakref.ref() returned; removing the assignment
* * Note list optimizationsRaymond Hettinger2004-02-131-13/+14
| | | | * Move an example out of a comment.
* Optimize list.pop() for the common special case of popping off the end.Raymond Hettinger2004-02-131-0/+5
| | | | More than doubles its speed.
* * Optimized list appends and pops by making fewer calls the underlying systemRaymond Hettinger2004-02-133-89/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | realloc(). This is achieved by tracking the overallocation size in a new field and using that information to skip calls to realloc() whenever possible. * Simplified and tightened the amount of overallocation. For larger lists, this overallocates by 1/8th (compared to the previous scheme which ranged between 1/4th to 1/32nd over-allocation). For smaller lists (n<6), the maximum overallocation is one byte (formerly it could be upto eight bytes). This saves memory in applications with large numbers of small lists. * Eliminated the NRESIZE macro in favor of a new, static list_resize function that encapsulates the resizing logic. Coverting this back to macro would give a small (under 1%) speed-up. This was too small to warrant the loss of readability, maintainability, and de-coupling. * Some functions using NRESIZE had grown unnecessarily complex in their efforts to bend to the macro's calling pattern. With the new list_resize function in place, those other functions could be simplified. That is being saved for a separate patch. * The ob_item==NULL check could be eliminated from the new list_resize function. This would entail finding each piece of code that sets ob_item to NULL and adding a new line to invalidate the overallocation tracking field. Rather than impose a new requirement on other pieces of list code, it was preferred to leave the NULL check in place and retain the benefits of decoupling, maintainability and information hiding (only PyList_New() and list_sort() need to know about the new field). This approach also reduces the odds of breaking an extension module. (Collaborative effort by Raymond Hettinger, Hye-Shik Chang, Tim Peters, and Armin Rigo.)
* We have cp932 support in standard distribution now. And there's nowHye-Shik Chang2004-02-131-4/+3
| | | | no major codepages unsupported by Python, so remove the eg. case.
* use existing test object instead of defining a new classFred Drake2004-02-121-5/+3
|
* minor markup improvementsFred Drake2004-02-121-7/+7
|
* Replace backticks with repr() or "%r"Walter Dörwald2004-02-12246-962/+926
| | | | From SF patch #852334.
* This is my patch #876198 plus a NEWS entry and a header frob.Michael W. Hudson2004-02-123-6/+5
| | | | | Remove the ability to use (from C) arbitrary objects supporting the read buffer interface as the co_code member of code objects.
* fix minor markup error: \code{for} --> \keyword{for}Fred Drake2004-02-121-6/+7
|
* SF 895560: minor typoRaymond Hettinger2004-02-121-2/+2
|
* need to initialize ob_type slot at run-time, at least on cygwinSkip Montanaro2004-02-101-1/+2
|
* add support for \e to the {alltt} environmentFred Drake2004-02-102-1/+3
|
* SF #894428, fix typoNeal Norwitz2004-02-101-1/+1
|
* remove support for missing ANSI C header files (limits.h, stddef.h, etc).Skip Montanaro2004-02-1018-139/+17
|
* Fix indentation error in testGetServByName and rewrite loop to avoid clumsySkip Montanaro2004-02-101-5/+2
| | | | sentinel variable
* Make reversed() transparent with respect to length.Raymond Hettinger2004-02-102-1/+17
|
* Give itertools.repeat() a length method.Raymond Hettinger2004-02-102-2/+21
|
* the \file macro is no longer a good example of where \e can't be usedFred Drake2004-02-091-4/+5
|
* support \e in \file and \filenq; this is useful for Windows pathsFred Drake2004-02-091-1/+1
|
* Minor editsAndrew M. Kuchling2004-02-091-6/+7
|
* Documentation for PyDescr_NewClassMethod was missing - here's at leastThomas Heller2004-02-091-0/+5
| | | | | | the function prototype. Already backported to release23-maint.
* SF patch #892821: example for urllib2 has SyntaxErrorRaymond Hettinger2004-02-081-2/+1
| | | | (Contributed by George Yoshida.)
* Fix misspelled name.Raymond Hettinger2004-02-081-1/+1
|
* Fix typoRaymond Hettinger2004-02-081-1/+1
|
* SF patch #884022: dynamic execution profiling vs opcode predictionRaymond Hettinger2004-02-081-0/+9
| | | | | | | | | (Contributed by Andrew I MacIntyre.) disables opcode prediction when dynamic execution profiling is in effect, so the profiling counters at the top of the main interpreter loop in eval_frame() are updated for each opcode.
* SF patch #880552: Fix typo in usage message(prechm.py)Raymond Hettinger2004-02-081-3/+3
| | | | | | (Contributed by George Yoshida.) * Also convert tabs to spaces.