Element bug?(ElementTree)
limodou
limodou at gmail.com
Sat Dec 22 23:16:12 EST 2007
I don't know if it's a bug? Try below code:
>>> from elementtree.ElementTree import Element
>>> a = Element('a')
>>> if a:
... print 'hhhh'
...
>>> a.__len__()
0
You can see if I test a, the result will be False. I don't know if
it's an expected result, but this thing has beaten me some times.
--
I like python!
UliPad <<The Python Editor>>: http://code.google.com/p/ulipad/
meide <<wxPython UI module>>: http://code.google.com/p/meide/
My Blog: http://www.donews.net/limodou
More information about the Python-list
mailing list