mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
parent
ecfeb7f095
commit
70a6b49821
246 changed files with 926 additions and 962 deletions
|
@ -206,7 +206,7 @@ class bsdTableDB :
|
|||
try:
|
||||
key, data = cur.first()
|
||||
while 1:
|
||||
print `{key: data}`
|
||||
print repr({key: data})
|
||||
next = cur.next()
|
||||
if next:
|
||||
key, data = next
|
||||
|
@ -341,9 +341,9 @@ class bsdTableDB :
|
|||
try:
|
||||
tcolpickles = self.db.get(_columns_key(table))
|
||||
except DBNotFoundError:
|
||||
raise TableDBError, "unknown table: " + `table`
|
||||
raise TableDBError, "unknown table: %r" % (table,)
|
||||
if not tcolpickles:
|
||||
raise TableDBError, "unknown table: " + `table`
|
||||
raise TableDBError, "unknown table: %r" % (table,)
|
||||
self.__tablecolumns[table] = pickle.loads(tcolpickles)
|
||||
|
||||
def __new_rowid(self, table, txn) :
|
||||
|
@ -384,7 +384,7 @@ class bsdTableDB :
|
|||
self.__load_column_info(table)
|
||||
for column in rowdict.keys() :
|
||||
if not self.__tablecolumns[table].count(column):
|
||||
raise TableDBError, "unknown column: "+`column`
|
||||
raise TableDBError, "unknown column: %r" % (column,)
|
||||
|
||||
# get a unique row identifier for this row
|
||||
txn = self.env.txn_begin()
|
||||
|
@ -535,7 +535,7 @@ class bsdTableDB :
|
|||
columns = self.tablecolumns[table]
|
||||
for column in (columns + conditions.keys()):
|
||||
if not self.__tablecolumns[table].count(column):
|
||||
raise TableDBError, "unknown column: "+`column`
|
||||
raise TableDBError, "unknown column: %r" % (column,)
|
||||
|
||||
# keyed on rows that match so far, containings dicts keyed on
|
||||
# column names containing the data for that row and column.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue