Re: Pickle, __init__, and classes

2005-08-02 Thread Peter Hansen
Russell Blau wrote: > Try __new__(). http://docs.python.org/ref/customization.html This isn't > the usual application of __new__, but since it returns an object it should > be ideal for your purposes. Or simply create a factory function to return your instances -- which is in effect what __new_

Re: Pickle, __init__, and classes

2005-08-02 Thread Russell Blau
"Yin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I've created a class that reads in and processes a file in the > initializer __init__. The processing is fairly substantial, and thus, > instead of processing the file every time the object is created, I > pickle the object to a f