adding fields to picked structures

Martin von Loewis loewis at informatik.hu-berlin.de
Thu Dec 28 02:12:11 CET 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