Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > pickling extension types

Reply
Thread Tools

pickling extension types

 
 
benevilent@optusnet.com.au
Guest
Posts: n/a
 
      08-10-2004
Hey,

I am creating an extension type in C for Python, which I want it such
that instances can be pickled. I basically want the functionality of the
'object' type such that subclasses of the type which I define, can
define methods including __getstate__ which will get called on
pickling/unpickling.

To do this I need to define the __reduce__ method. The __reduce__ method
in typeobject.c is exactly what I need for this task. Is there a way to
reuse this without copy-pasting the code?

Thanks,
Laurie
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pickling an extension type subclasses problems Gaetan de Menten Python 0 02-05-2010 02:25 PM
pickling extension class harold fellermann Python 4 01-18-2005 09:38 PM
Pickling/unpickling extensions types Bob Python 1 09-11-2003 06:13 AM
PS: Help pickling across sockets Jonathan Hayward Python 1 08-17-2003 02:39 AM
Help pickling across sockets Jonathan Hayward Python 0 08-17-2003 12:51 AM



Advertisments