def copychildren(self, newdoc=None, idsuffix=""):
        """Generator creating a deep copy of the children of this element. If idsuffix is a string, if set to True, a random idsuffix will be generated including a random 32-bit hash"""
        if idsuffix is True: idsuffix = ".copy." + "%08x" % random.getrandbits(32) #random 32-bit hash for each copy, same one will be reused for all children
        for c in self:
            if isinstance(c, Word):
                yield WordReference(newdoc, id=c.id)
            else:
                yield c.copy(newdoc,idsuffix)
def copychildren ( self , newdoc = None , idsuffix = "" ) : if idsuffix is True : idsuffix = ".copy." + "%08x" % random . getrandbits ( 32 ) for c in self : if isinstance ( c , Word ) : yield WordReference ( newdoc , id = c . id ) else : yield c . copy ( newdoc , idsuffix )
Generator creating a deep copy of the children of this element. If idsuffix is a string, if set to True, a random idsuffix will be generated including a random 32-bit hash