From: Victor Ng <vn...@ma...> - 2003-09-17 20:56:13
|
If I define the same class twice using SQLObject.SQLObject as the parent, I get the following error: >>> from SQLObject import * >>> class foo(SQLObject): ... aColumn = IntCol() ... >>> class foo(SQLObject): ... aColumn = IntCol() ... Traceback (most recent call last): File "<stdin>", line 1, in ? File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site- packages/SQLObject/SQLObject.py", line 161, in __new__ assert not classRegistry.get(registry, {}).has_key(className), "A database object by the name %s has already been created" % repr(className) AssertionError: A database object by the name 'foo' has already been created Shouldn't I be able to redefine the class? I'm not sure why an assertion is being thrown. vic |