En Thu, 21 Jun 2007 05:36:42 -0300, Kenji Noguchi <[EMAIL PROTECTED]> escribió:
> I confirmed that "%08x" % int(y) works. And yes, I'm hoping so. > It actually works that way if the v is less than or equal to 0x7ffffffff. > >> It is a bug, at least for me, and I have half of a patch addressing it. >> As a workaround, convert explicitely to long before formatting. > > I'm interested in your patch. What's the other half still missing? As you have seen, PyString_Format doesn't handle well objects that can be converted to long but are not longs themselves; I've modified that function, but PyUnicode_Format has a similar problem, that's "the other half". Maybe this weekend I'll clean those things and submit the patch. -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list