Author dalcinl
Recipients dalcinl
Date 2009-02-06.23:36:42
SpamBayes Score 0.000173669
Marked as misclassified No
Message-id <1233963466.4.0.0489916221286.issue5175@psf.upfronthosting.co.za>
In-reply-to
Content
At Objects/longobject.c, in almost all cases
OverflowError is raised when a unsigned integral is requested from a
negative PyLong. However, this one breaks the rules:

int
_PyLong_AsByteArray(PyLongObject* v,
                  unsigned char* bytes, size_t n,
                  int little_endian, int is_signed)
{
<...>
              if (!is_signed) {
                      PyErr_SetString(PyExc_TypeError,
                              "can't convert negative long to 
unsigned");
                      return -1;
              }
<...>
}
History
Date User Action Args
2009-02-06 23:37:46dalcinlsetrecipients: + dalcinl
2009-02-06 23:37:46dalcinlsetmessageid: <1233963466.4.0.0489916221286.issue5175@psf.upfronthosting.co.za>
2009-02-06 23:36:42dalcinllinkissue5175 messages
2009-02-06 23:36:42dalcinlcreate