Wrapping a class set method

2005-07-27 Thread snoe
Hi there, I have the following simplified classes: class Project: def __init__(self,pname): self.devices = {} # Dictionary of Device objects self.pname = pname def setpname(self,pname): self.pname = pname def adddevice(self,dname):

Re: Wrapping a class set method

2005-07-27 Thread Bengt Richter
On 27 Jul 2005 11:42:24 -0700, snoe [EMAIL PROTECTED] wrote: Hi there, I have the following simplified classes: class Project: def __init__(self,pname): self.devices = {} # Dictionary of Device objects self.pname = pname def setpname(self,pname): self.pname =

Re: Wrapping a class set method

2005-07-27 Thread Paolino
snoe wrote: I have a suspicion that there's an easier way to do this than explicitly adding a Project.pickleme() call to the beginning of all of my set/add methods. So is there a way to wrap methods for this type of functionality or is there another way of doing this, maybe without using

Re: Wrapping a class set method

2005-07-27 Thread Paolino
snoe wrote: I have a suspicion that there's an easier way to do this than explicitly adding a Project.pickleme() call to the beginning of all of my set/add methods. So is there a way to wrap methods for this type of functionality or is there another way of doing this, maybe without using