dbf.py API question concerning Index.index_search()
ethan at stoneleaf.us
Thu Aug 16 18:13:27 CEST 2012
> On 16/08/2012 02:22, Ethan Furman wrote:
>> Steven D'Aprano wrote:
>>> On Wed, 15 Aug 2012 16:26:09 -0700, Ethan Furman wrote:
>>>> Indexes have a new method (rebirth of an old one, really):
>>>> partial=False )
>>> Why "index_search" rather than just "search"?
>> Because "search" already exists and returns a dbf.List of all matching
> Perhaps that should've been called "find_all"!
In interesting thought.
Currently there are:
.index(data) --> returns index of data in Index, or raises error
.query(string) --> brute force search, returns all matching records
.search(match) --> binary search through table, returns all matching
'index' and 'query' are supported by Tables, Lists, and Indexes; search
(and now index_search) are only supported on Indexes.
More information about the Python-list