<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><head><style>p {margin:0px;padding:0px;} blockquote { border: 0px; margin-top: 0px; margin-bottom: 0px; }</style></head><body style="">
Hi,<a href="http://service.gmx.net/fm07/g.fcgi/mail/new?CUSTOMERNO=1130295&t=de2006891615.1207575133.46ca5a04&to=jholg%40gmx.de"></a><br><font color="#000000" face="Verdana" size="2"><br><blockquote type="cite">> I actually wasn't aware of that behaviour of Python booleans.<br>> And this is definitely no priority for me. Then again, one could argue<br>> that BoolElement should behave as much as a native bool in Python,<br>> only that its XML representation is the string value "true".<br><br>Hmm, I buy that. As long as the conversion is explicit, I think objectify<br>Elements /should/ behave as their Python counter types.<br><br>I'll check if inheriting from IntElement does the right thing.<br></blockquote></font><p> </p><p><font color="#000000"><font size="2"><font face="Verdana">Maybe the __int__, __float__ etc. methods should even go the</font></font></font></p><p>the ObjectifiedDataElement class? So basically every explicit to-number</p><p>conversion for data elements would work right out of the box, if the</p><p>corresponding pyval class supports it. </p><p>For BoolElement, you'd need t override it anyway, as str(textOf(self._c_node)) </p><p>will not work for "true".</p><p> </p><p>Holger </p><p></p><p></p><div class="signature"><br /><br /><br />-- <br />Psssst! Schon vom neuen GMX MultiMessenger gehört?<br />Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger</div></body></html>