On Tue, Nov 23, 2010 at 11:01 PM, Shai Berger <[email protected]> wrote:
> Hi Ram and all, > > 1) To me, it makes more sense to define the property you seek on the > negative: > an object is "atomically unpicklable", or "inherently unpicklable", if it > cannot be pickled, for any value of its attributes. > Yeah, I guess that makes more sense; However, I'd still like to present a positive function to the user (`is_atomically_pickleable`) and not a negative one. (`is_inherently_unpickleable`). But I wouldn't complain if I was given the latter :) > 2) I'm not sure how you'd characterize a good answer; I think Laurence > Gonsalves' answer on StackOverflow is quite good. > Laurence's answer seems wrong to me. He's calling the pickler, and on consequence is that the pickler does the `__reduce__` dance, but that seems like overkill. I think this causes waste. (Probably doing the actual pickling of the object instead of just checking if it's possible.) Checking if an object is atomically pickleable should not involve the object at all; Only its type. Ram.
_______________________________________________ Python-il mailing list [email protected] http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il
