mirror of
https://github.com/python/cpython.git
synced 2025-07-30 14:44:10 +00:00
bsddb module updated to version 4.7.2devel9.
This patch publishes the work done until now for Python 3.0 compatibility. Still a lot to be done. When possible, we use 3.0 features in Python 2.6, easing development and testing, and exposing internal changes to a wider audience, for better test coverage. Some mode details: http://www.jcea.es/programacion/pybsddb.htm#bsddb3-4.7.2
This commit is contained in:
parent
30e208d525
commit
c5a11fabdb
16 changed files with 1395 additions and 752 deletions
|
@ -22,7 +22,6 @@ import sys
|
|||
import copy
|
||||
import random
|
||||
import struct
|
||||
from types import ListType, StringType
|
||||
import cPickle as pickle
|
||||
|
||||
try:
|
||||
|
@ -229,7 +228,7 @@ class bsdTableDB :
|
|||
|
||||
raises TableDBError if it already exists or for other DB errors.
|
||||
"""
|
||||
assert isinstance(columns, ListType)
|
||||
assert isinstance(columns, list)
|
||||
txn = None
|
||||
try:
|
||||
# checking sanity of the table and column names here on
|
||||
|
@ -270,7 +269,7 @@ class bsdTableDB :
|
|||
"""Return a list of columns in the given table.
|
||||
[] if the table doesn't exist.
|
||||
"""
|
||||
assert isinstance(table, StringType)
|
||||
assert isinstance(table, str)
|
||||
if contains_metastrings(table):
|
||||
raise ValueError, "bad table name: contains reserved metastrings"
|
||||
|
||||
|
@ -300,7 +299,7 @@ class bsdTableDB :
|
|||
additional columns present in the given list as well as
|
||||
all of its current columns.
|
||||
"""
|
||||
assert isinstance(columns, ListType)
|
||||
assert isinstance(columns, list)
|
||||
try:
|
||||
self.CreateTable(table, columns)
|
||||
except TableAlreadyExists:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue