- 14 May, 2002 6 commits
-
-
Guido van Rossum authored
inside the while loop either.
-
Fred Drake authored
-
matt@zope.com authored
-
Guido van Rossum authored
first byte -- we always find the end of a particular encoded number by searching for the next byte with the high bit set. This simplifies the encoding and gives us more space for small encodings: 128 values can now be encoded in 1 byte, and 16K in 2 bytes.
-
Guido van Rossum authored
-
Jeremy Hylton authored
_indexedSearch(): Simplify logic that called _apply_index() for each index in the catalog. The if statement under the comment "Optimization" had identical code on either branch. Perhaps the odd indentation made this confusing. Regardless, remove the conditional. Change computation of normalized scores to multiply first, then divide. Use literal 100. to make sure mult and div are floating point ops. searchResults(): Simplify logic at beginning of searchResults(). The first two conditionals depended on kw, so organize the logic to make that clearer. Write helper method to find "sort-on" and "sort-index" instead of duplicating code in searchResults(). For case were results are sorted, simplify construction of the final LazyCat and make it more efficient to boot. Instead of use a list comprehension and a reduce + lambda to construct list and length of contained lists, do it with one explicit for loop that constructs both values. Note: I did detailed timing stats on three ways to compute the length of a sequence of sequences. reduce + lambda was the slowest. For short lists, an explicit for loop is fastest. For long lists, reduce(operater.add, map(len, list)) is fastest. The explicit for loop is big win here, because we've got to walk over the elements anyway to undo the Schwarzian transform. Sundry: Use getattr() with default value of None in preference to hasattr() followed by getattr(). This gets the same result with half the work. Changes for consistent and frequent use of whitespace. Use types.StringType and isinstance() to test for strings.
-
- 13 May, 2002 1 commit
-
-
Jeremy Hylton authored
-
- 10 May, 2002 3 commits
-
-
Fred Drake authored
content, but does not match the expected end tag, treat it as character data. This is mostly useful when script includes string literal that include end tags.
-
Fred Drake authored
-
matt@zope.com authored
from 2.5 branch.
-
- 09 May, 2002 2 commits
-
-
Andreas Jung authored
- Collector 386: workaround for hanging FTP connections with NcFTP
-
Toby Dickenson authored
-
- 07 May, 2002 5 commits
-
-
Guido van Rossum authored
don't have a corresponding .py file, to prevent tests that import deleted modules from running using the stale bytecode files. This has bitten enough people enough times that it's time it became a standard part of every test suite runner. (Zope3 already has it.) Somebody merge this into the Zope2 trunk please.
-
Shane Hathaway authored
-
Toby Dickenson authored
-
Toby Dickenson authored
-
Toby Dickenson authored
refactored much code that conditionally called v.read(). Also, allow the input to a converter to be a unicode string. This is not used by ZPublisher, but is helpful for other code that uses the converters such as OFS.PropertyManager
-
- 06 May, 2002 1 commit
-
-
Andreas Jung authored
-
- 03 May, 2002 2 commits
-
-
Andreas Jung authored
(revision 1.72 or Catalog.py). TTW searches are no longer optimized to restore the old behaviour (user does not fill out any form fields -> return all hits) For application related searches we keep the optimization but it is possible to disable optimization by passing 'optimize=0' as additional parameters to searchResults().
-
Andreas Jung authored
-
- 30 Apr, 2002 3 commits
-
-
Jeremy Hylton authored
-
Jeremy Hylton authored
-
Jeremy Hylton authored
Simplify initZopeSplitter() and remove unnecessary PyErr_Occurred(). Use string macros for objects that are guaranteed to be strings. Remove unnecessary \ at end of line. In innermost loop of splitter function, replace ASSIGN() macro with Py_DECREF() and simple assignment. The macro was doing more work than necessary because it called XDECREF on an object that was guaranteed not to be NULL. Use less horizontal whitespace in next_word().
-
- 26 Apr, 2002 2 commits
-
-
Janko Hauser authored
-
Toby Dickenson authored
-
- 25 Apr, 2002 9 commits
-
-
Andreas Jung authored
(without converting their contents...needs reindexing)
-
Andreas Jung authored
-
Andreas Jung authored
-
Andreas Jung authored
-
Andreas Jung authored
-
Toby Dickenson authored
-
Andreas Jung authored
be needed for the ZMI
-
Andreas Jung authored
unneeded imports
-
Toby Dickenson authored
-
- 24 Apr, 2002 6 commits
-
-
Andreas Jung authored
to retrieve the id of an index from index.id to index.getId()
-
Andreas Jung authored
-
Andreas Jung authored
Pluggable indexes no longer subclass PluggableIndex.PluggableIndex. Instead PluggableIndex.py only contains the interface description.
-
Toby Dickenson authored
-
Toby Dickenson authored
-
Toby Dickenson authored
-