Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Python int to hex string

Name: Anonymous 2007-12-24 2:58

class crc32calc:
    def __init__(self): self.value = 0
    def update(self, data): self.value = zlib.crc32(data, self.value)
    def digest(self): return self.value
    def hexdigest(self): return '%08x' % self.value

Trying to get result of crc32 sum in hex. '%08x', however, sometimes returns a negative value (negative sign followed by seven hex digits). How can I get the right value?

Name: Anonymous 2007-12-24 4:31

Is Python tail-recursive?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List