__getinitargs__()

ddodini at my-deja.com ddodini at my-deja.com
Thu Aug 24 00:42:22 EDT 2000


Does someone have a sample of making this work in the context of
persistant objects whose constructor's take arguments? It would be great
if I could see a quick sample of this. Below is what I am doing now. It
isn't working for me.


class FullyConstructedPersistantObject:
    def __init__(self, obj_name, obj_id):
        self.m_name = obj_name
        self.m_id = obj_id

    def __getinitargs__(self, shelf_file):
        shelf = shelve.open(shelf_file)
        return shelf

Thanks,
David


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list