added form compatibility with old api, stanzas now bool() to True on 2.x, jid attributes will return '' if not set

This commit is contained in:
fritzy
2010-08-21 22:48:43 +00:00
parent c05ddcb7f5
commit 345656926e
5 changed files with 53 additions and 9 deletions

View File

@@ -362,7 +362,10 @@ class ElementBase(object):
self.idx = 0
return self
def __bool__(self):
def __bool__(self): #python 3.x
return True
def __nonzero__(self): #python 2.x
return True
def __next__(self):