[Python-Dev] [Python-3000] inst_persistent_id (original) (raw)
Alexandre Vassalotti alexandre at peadrop.com
Tue Jan 15 00:04:06 CET 2008
- Previous message: [Python-Dev] [Python-3000] inst_persistent_id
- Next message: [Python-Dev] [Python-3000] inst_persistent_id
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Oh, you are right. I thought that save_inst() used inst_persistent_id, but that isn't the case. Now, I have checked more thoroughly and found the relevant piece of code:
if (!pers_save && self->inst_pers_func) {
if ((tmp = save_pers(self, args, self->inst_pers_func)) != 0) {
res = tmp;
goto finally;
}
}
which is indeed called only when the object is not "supported" by pickle.
I guess my original argument doesn't hold anymore, thus I don't have anything against supporting this feature officially.
Thanks for correcting me! -- Alexandre
On Jan 14, 2008 12:59 PM, Armin Rigo <arigo at tunes.org> wrote:
Hi,
On Sat, Jan 12, 2008 at 07:33:38PM -0500, Alexandre Vassalotti wrote: > Well, in Python 3K, instpersistentid() won't be usable, since > PyInstanceType was removed. Looking at the code, instpersistentid() is just a confusing name. It has got nothing to do with PyInstanceType; it's called for any object type that cPickle.c doesn't know how to handle. In fact, it seems that cPickle.c never calls instpersistentid() for objects of type PyInstanceType...
A bientot, Armin.
- Previous message: [Python-Dev] [Python-3000] inst_persistent_id
- Next message: [Python-Dev] [Python-3000] inst_persistent_id
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]