Magnus Lycka <magnus at thinkware.se> wrote: > def __str__(self): > res = [] > while self.addr: > self.addr, digit = divmod(self.addr,256) > res.append(str(digit)) > res.reverse() > return ".".join(res) After calling __str__, self.addr is 0L. Insert 'addr = self.addr' at the beginning and use 'addr'. HTH Marc