def __init__(self,name,code=None,typ=None,text=None):
        if ERRORS.has_key(name):
            cod,type,txt=ERRORS[name]
            ns=name.split()[0]
        else: cod,ns,type,txt='500',NS_STANZAS,'cancel',''
        if typ: type=typ
        if code: cod=code
        if text: txt=text
        Node.__init__(self,'error',{},[Node(name)])
        if type: self.setAttr('type',type)
        if not cod: self.setName('stream:error')
        if txt: self.addChild(node=Node(ns+' text',{},[txt]))
        if cod: self.setAttr('code',cod)
The new-style print function for Python 2.4 and 2.5.
dataset/ETHPy150Open CouchPotato/CouchPotatoServer/libs/xmpp/protocol.py/ErrorNode.__init__--crossover with--dataset/ETHPy150Open alecthomas/importmagic/importmagic/six.py/print_