adding fields to picked structures

Martin von Loewis loewis at informatik.hu-berlin.de
Wed Dec 27 20:12:11 EST 2000


Bob van der Poel <bvdpoel at uniserve.com> writes:

> So, I suppose I could write a conversion utility...but, I'd like to
> avoid that if possible. Am I missing something...or is this just the way
> life should be?

Your new class could implement a __setstate__ method, which could
analyse the structure it receives, and set the missing fields to some
default value.

Regards,
Martin




More information about the Python-list mailing list