Commit 425e0a91 authored by chris's avatar chris

Updated doc strings

parent 005aafef
...@@ -27,15 +27,12 @@ Example usage: ...@@ -27,15 +27,12 @@ Example usage:
i.index(doc, key) i.index(doc, key)
# perform a test search # perform a test search
try: print i['blah']
print i['blah']
except KeyError:
print 'No such key, "blah"'
InvertedIndex provides three types of indexes: one non-persistent InvertedIndex provides three types of indexes: one non-persistent
index, Index, and two persistent indexes, Persistent and Transactional. index, Index, and two persistent indexes, Persistent and Transactional.
$Id: InvertedIndex.py,v 1.4 1996/12/03 18:11:57 chris Exp $''' $Id: InvertedIndex.py,v 1.5 1996/12/03 18:15:07 chris Exp $'''
# Copyright # Copyright
# #
# Copyright 1996 Digital Creations, L.C., 910 Princess Anne # Copyright 1996 Digital Creations, L.C., 910 Princess Anne
...@@ -87,6 +84,9 @@ $Id: InvertedIndex.py,v 1.4 1996/12/03 18:11:57 chris Exp $''' ...@@ -87,6 +84,9 @@ $Id: InvertedIndex.py,v 1.4 1996/12/03 18:11:57 chris Exp $'''
# (540) 371-6909 # (540) 371-6909
# #
# $Log: InvertedIndex.py,v $ # $Log: InvertedIndex.py,v $
# Revision 1.5 1996/12/03 18:15:07 chris
# Updated doc strings
#
# Revision 1.4 1996/12/03 18:11:57 chris # Revision 1.4 1996/12/03 18:11:57 chris
# Went back to returning empty ResultLists for failed searches. # Went back to returning empty ResultLists for failed searches.
# #
...@@ -104,7 +104,7 @@ $Id: InvertedIndex.py,v 1.4 1996/12/03 18:11:57 chris Exp $''' ...@@ -104,7 +104,7 @@ $Id: InvertedIndex.py,v 1.4 1996/12/03 18:11:57 chris Exp $'''
# #
# #
# #
__version__='$Revision: 1.4 $'[11:-2] __version__='$Revision: 1.5 $'[11:-2]
import regex, regsub, string, marshal import regex, regsub, string, marshal
...@@ -291,10 +291,7 @@ class Index: ...@@ -291,10 +291,7 @@ class Index:
i.index(doc, key) i.index(doc, key)
# perform a test search # perform a test search
try: print i['blah']
print i['blah']
except KeyError:
print 'No such key, "blah"'
''' '''
list_class = ResultList list_class = ResultList
...@@ -558,11 +555,8 @@ class Persistent(Index): ...@@ -558,11 +555,8 @@ class Persistent(Index):
i.index(doc, key) i.index(doc, key)
# perform a test search # perform a test search
try: print i['blah']
print i['blah']
except KeyError:
print 'No such key, "blah"'
Using an existing index: Using an existing index:
doc = open('/usr/users/chris/doc2.txt', 'r').read() doc = open('/usr/users/chris/doc2.txt', 'r').read()
...@@ -577,10 +571,7 @@ class Persistent(Index): ...@@ -577,10 +571,7 @@ class Persistent(Index):
i.index(doc, key) i.index(doc, key)
# perform a test search # perform a test search
try: print i['blah']
print i['blah']
except KeyError:
print 'No such key, "blah"'
''' '''
list_class = PersistentResultList list_class = PersistentResultList
...@@ -703,10 +694,7 @@ class Transactional(Index): ...@@ -703,10 +694,7 @@ class Transactional(Index):
get_transaction().commit() get_transaction().commit()
# perform a test search # perform a test search
try: print i['blah']
print i['blah']
except KeyError:
print 'No such key, "blah"'
Using an existing index: Using an existing index:
...@@ -722,10 +710,7 @@ class Transactional(Index): ...@@ -722,10 +710,7 @@ class Transactional(Index):
i.index(doc, key) i.index(doc, key)
# perform a test search # perform a test search
try: print i['blah']
print i['blah']
except KeyError:
print 'No such key, "blah"'
''' '''
list_class = STPResultList list_class = STPResultList
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment