durusmail: durus-users: Odd FutureWarning
Odd FutureWarning
2004-10-22
Odd FutureWarning
Peter Fein
2004-10-22
Occasionally I get the following warning:

/home/pafein/lib/python/durus/persistent.py:113: FutureWarning:
%u/%o/%x/%X of negative int will return a signed string in Python 2.4
and up
identifier = '@%x' % id(self)

which refers to (snipped from persistent.py):
    def __repr__(self):
        if self._p_oid is None:
            identifier = '@%x' % id(self)
        else:
            identifier = self._p_format_oid()
        return "<%s %s>" % (self.__class__.__name__, identifier)

I'm somewhat surprised that id() returns a negative value, but things
appear to work just fine...

This is on Durus 1.2 with Python 2.3.4 on linux.

--Pete

--
Peter Fein                 pfein@pobox.com                 773-575-0694

Be alert - some terrorists look normal. -Ministry of Information, Brazil

reply