It would appear that copy.deepcopy() is working as per spec, and it's just a happy accident that pickling BTrees.Length.Length() instances with the value of 0 works.
The fix should be trivial: add a class attribute 'value = 0' to BTrees.Length.Length.
The Official Python Documentation states
Note: For new-style classes, if __getstate__() returns a false value, the __setstate__() method will not be called.
-- http:// docs.python. org/library/ pickle. html#object. __setstate_ _
It would appear that copy.deepcopy() is working as per spec, and it's just a happy accident that pickling BTrees. Length. Length( ) instances with the value of 0 works.
The fix should be trivial: add a class attribute 'value = 0' to BTrees. Length. Length.