[ZODB-Dev] ZODB and new style classes?
Magnus Lycka
magnus@thinkware.se
Wed, 26 Jun 2002 13:09:43 +0200
I've realized that it would be good for me to sub class
string....
What version of ZODB do I need to do that? I'm using
StandaloneZODB 1.0 today, but I got the impression that
this version doesn't handle Python 2.2 new style classes.
(TypeError: metatype conflict among bases)
Is whatever-version-I-need stable, and will there be any
problems in using my current file storage database files
with that version?
I just tried something like:
class MyClass(str, Persistence.Persistent):
blah blah blah
That way I planned to get a persistent string that I can
attach more attributes to. I have a lot of code assuming
this object is a string (plenty of 'if object in "asdfgh"'
etc) but now I suddenly need to have colours etc as well. :-(
--=20
Magnus Lyck=E5, Thinkware AB
=C4lvans v=E4g 99, SE-907 50 UME=C5
tel: 070-582 80 65, fax: 070-612 80 65
http://www.thinkware.se/ mailto:magnus@thinkware.se