[ZODB-Dev] Persistent class in python
Dieter Maurer
dieter at handshake.de
Sun Jul 27 02:21:21 EDT 2008
-LМикола Харечко wrote at 2008-7-19 19:50 +0300:-A
>Hi. I am trying to rewrite Persistent class to python. How can i write
>python class that passes this tests (persistent.txt ):
>
>Basic type structure
>--------------------
> >>> Persistent.__dictoffset__
> 0
> >>> Persistent.__weakrefoffset__
> 0
> >>> Persistent.__basicsize__ > object.__basicsize__
> True
>
>and at the same time - it will be possible to create weakreferences to
>this class (in PickleCache). Also this class must not have __slots__
>(__getstate__ method).
I think, you should change the test.
The tests above verify that "Persistent" is implemented in "C",
thus cannot work when you implement "Persistent" in Python.
--
Dieter
More information about the ZODB-Dev
mailing list