Changing the class of an instance

Steven E. Harris sharris at nospam.primus.com
Mon Jul 17 13:11:14 EDT 2000


richard at cogsci.ed.ac.uk (Richard Tobin) writes:

[...]

> None, except to directly model the XML Schema specification which
> talks in terms of adding properties to info items in an existing
> infoset.

Perhaps the "Envelope-Letter Idiom" is applicable here, provided that
clients of the validation transformation don't need to know the
precise type of the grove nodes.

Which raises a different idea: Would a generic "get/set property"
interface be acceptable? In that way, the additional properties
getting added by the validation phase don't change the objects'
concrete interface. Rather, they just expand the range of possible
property strings to set or get. I know that's not as syntactically
nice as swapping the concrete interface.

[...]

-- 
Steven E. Harris
Primus Knowledge Solutions, Inc.
http://www.primus.com



More information about the Python-list mailing list