Sean Blakey wrote:
On 7 Apr 2005 15:27:06 -0700, syd <[EMAIL PROTECTED]> wrote:

def unpickle(self):
  self = pickle.load(open(self.getFilePath('pickle')))

Note, however, that you can MODIFY self in-place within a method. You
can probably hack together a solution that modifies self.__dict__,
self.__class__, self.__class__.__dict__, or some other magic
properties.

such as

  def unpickle(self):
    new_self = pickle.load(open(self.getFilePath('pickle')))
    self.__class__ = new_self.__class__
    self.__dict__.update(new_self.__dict__)

--
Greg Ewing, Computer Science Dept,
University of Canterbury,       
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to