- 24 May, 2001 2 commits
-
-
Martin v. Löwis authored
Use new _PyString_Eq in lookdict_string.
-
Tim Peters authored
they're entirely full. Not a question of correctness, but of temporarily misplaced common sense.
-
- 23 May, 2001 9 commits
-
-
Tim Peters authored
dictresize() was too aggressive about never ever resizing small dicts. If a small dict is entirely full, it needs to rebuild it despite that it won't actually resize it, in order to purge old dummy entries thus creating at least one virgin slot (lookdict assumes at least one such exists). Also took the opportunity to add some high-level comments to dictresize.
-
Jack Jansen authored
-
Barry Warsaw authored
tuples by filename/lineno, then sort the catalog entries by their location tuples.
-
Guido van Rossum authored
tabs. The title was centered using 8-byte tabs, however, and the result looked strange. Fixed this.
-
Jack Jansen authored
-
Tim Peters authored
Change test_doctest and test_difflib to pass regrtest's notion of verbosity on to doctest. Add explanation for a dozen "new" things to test/README.
-
Fred Drake authored
testing using doctest and PyUnit.
-
Fred Drake authored
-
Tim Peters authored
generating it. Since this is purely a doctest, the output file never served a good purpose.
-
- 22 May, 2001 29 commits
-
-
Guido van Rossum authored
-
Jack Jansen authored
-
Fred Drake authored
-
Jack Jansen authored
Fixed glue initialization code so prototype is correct.
-
Fred Drake authored
tests were moved to PyUnit.
-
Jack Jansen authored
-
Jack Jansen authored
-
Fred Drake authored
Message object.
-
Jack Jansen authored
Lots more Carbon/Carbon.h includes, new UPP routine names, function prototypes. Most toolbox modules now compile, link and import in MacOSX-MachO python.
-
Jack Jansen authored
-
Fred Drake authored
-
Fred Drake authored
for this.
-
Tim Peters authored
The idea is Marc-Andre Lemburg's, the implementation is Tim's. Add a new ma_smalltable member to dictobjects, an embedded vector of MINSIZE (8) dictentry structs. Short course is that this lets us avoid additional malloc(s) for dicts with no more than 5 entries. The changes are widespread but mostly small. Long course: WRT speed, all scalar operations (getitem, setitem, delitem) on non-empty dicts benefit from no longer needing NULL-pointer checks (ma_table is never NULL anymore). Bulk operations (copy, update, resize, clearing slots during dealloc) benefit in some cases from now looping on the ma_fill count rather than on ma_size, but that was an unexpected benefit: the original reason to loop on ma_fill was to let bulk operations on empty dicts end quickly (since the NULL-pointer checks went away, empty dicts aren't special-cased any more). Special considerations: For dicts that remain empty, this change is a lose on two counts: the dict object contains 8 new dictentry slots now that weren't needed before, and dict object creation also spends time memset'ing these doomed-to-be-unsused slots to NULLs. For dicts with one or two entries that never get larger than 2, it's a mix: a malloc()/free() pair is no longer needed, and the 2-entry case gets to use 8 slots (instead of 4) thus decreasing the chance of collision. Against that, dict object creation spends time memset'ing 4 slots that aren't strictly needed in this case. For dicts with 3 through 5 entries that never get larger than 5, it's a pure win: the dict is created with all the space they need, and they never need to resize. Before they suffered two malloc()/free() calls, plus 1 dict resize, to get enough space. In addition, the 8-slot table they ended with consumed more memory overall, because of the hidden overhead due to the additional malloc. For dicts with 6 or more entries, the ma_smalltable member is wasted space, but then these are large(r) dicts so 8 slots more or less doesn't make much difference. They still benefit all the time from removing ubiquitous dynamic null-pointer checks, and get a small benefit (but relatively smaller the larger the dict) from not having to do two mallocs, two frees, and a resize on the way *to* getting their sixth entry. All in all it appears a small but definite general win, with larger benefits in specific cases. It's especially nice that it allowed to get rid of several branches, gotos and labels, and overall made the code smaller.
-
Fred Drake authored
-
Fred Drake authored
-
Fred Drake authored
-
Fred Drake authored
isabs() (no false results were checked) and splitdrive().
-
Fred Drake authored
Update to reflect using "" as the default value for the second parameter to the get() method.
-
Fred Drake authored
setdefault() the empty string. In setdefault(), use + to join the value to create the entry for the headers attribute so that TypeError is raised if the value is of the wrong type.
-
Tim Peters authored
When regrtest.py finds an attribute "test_main" in a test it imports, regrtest runs the test's test_main after the import. test_threaded_import needs this else the cross-thread import lock prevents it from making progress. Other tests can use this hack too, but I doubt it will ever be popular.
-
Fred Drake authored
-
Guido van Rossum authored
This should be faster. This means: (1) "for line in file:" won't work if the xreadlines module can't be imported. (2) The body of "for line in file:" shouldn't use the file directly; the effects (e.g. of file.readline(), file.seek() or even file.tell()) would be undefined because of the buffering that goes on in the xreadlines module.
-
Fred Drake authored
-
Guido van Rossum authored
ought to be faster.
-
Tim Peters authored
instead. Allows this test to finish on Windows again.
-
Barry Warsaw authored
-
Barry Warsaw authored
localization of month and day names.
-
Fred Drake authored
when #ifdef was needed. This closes (reallu!) SF bug #417418.
-
Fred Drake authored
add a list of the mapping methods which are not supported (per Barry's comments).
-