<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><ul><li>Each (known) extension has its own strongly-typed model object.</li></ul></div></blockquote></div><div><br>Does that mean that an extension cannot add properties to an existing object (such as adding a new attribute an Image), or just that all of those properties will be an a nested object (such as Image.my_extension.my_attribute)?</div>
</div></blockquote><div><br></div><div>Good point - I should clarify...  I'm not using the standard Java XML binding code here, because they would require a wrapping object.  It's using custom code to do the binding whenever data from a different namespace is encountered, although it uses the standard JAXB annotations to guide it.  From the user's point of view, "it just works"; the implementation is not as nice :-)</div>
<div><br></div><div>Because we're not wrapping our extensions in their own elements, I didn't know how to get the standard tooling to work with it anyway.  Interesting data-point for the "standard tools" argument...</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div></div><div>Now, how you would do something that awesome in Python, I don't know ;-)</div></blockquote><div><br></div></div><div>Probably the same way. I would use setuptools entry points to map namespace prefixes to the class, so the client could load the handler automatically when it encounters data it does not recognize.</div>
</div></blockquote><div><br></div><div>Yes - I should have said "dictionary" rather than "registry"!  Are you doing this in python-novaclient?  Awesome!</div><div><br></div></div>