15.03.12 21:59, Gil Colgate написав(ла):
How about 'G'? (Giant, or perhaps gynormous, integer?)
Then I could also map 'g' to the signed version (same as L) for consistency.
For consistency 'g' must be `unsigned long` with overflow checking.
And how about 'M'? 'K', 'L', and 'M' are neighborin
15.03.12 21:59, Gil Colgate написав(ла):
How about 'G'? (Giant, or perhaps gynormous, integer?)
Then I could also map 'g' to the signed version (same as L) for consistency.
What about unsigned char, short, int, and long with overflow checking?
___
2012/3/15 Gil Colgate :
> How about 'G'? (Giant, or perhaps gynormous, integer?)
>
>
> Then I could also map 'g' to the signed version (same as L) for consistency.
Sounds okay to me.
--
Regards,
Benjamin
___
Python-Dev mailing list
Python-Dev@python.
How about 'G'? (Giant, or perhaps gynormous, integer?)
Then I could also map 'g' to the signed version (same as L) for consistency.
On Thu, Mar 15, 2012 at 11:49 AM, Benjamin Peterson wrote:
> 2012/3/15 Gil Colgate :
> > We use a lot of UnsignedLongLongs in our program (ids) and have been
> par
The lzma module ran into a similar issue with 32-bit unsigned ints.
I worked around it by writing a custom converter function to use
with the "O&" code.
You can find the converter definition here:
http://hg.python.org/cpython/file/default/Modules/_lzmamodule.c#l134
And an example usage here:
2012/3/15 Gil Colgate :
> I must be using a different version of python, (3.2), I don't see that one
> in use. Do you have a different suggestion?
It's not used in PyArg_Parse*, but it is for Py_BuildValue. Adding it
to PyArg_Parse could create confusion.
>
> On Thu, Mar 15, 2012 at 11:49 AM, Ben
2012/3/15 Gil Colgate :
> We use a lot of UnsignedLongLongs in our program (ids) and have been parsing
> in PyArg_ParseTuple with 'K', which does not do error checking.
> I am planning to add a new type to our local build of python for parsing
> Unsigned Long Longs (64 bit numbers) that errrors if
We use a lot of UnsignedLongLongs in our program (ids) and have been
parsing in PyArg_ParseTuple with 'K', which does not do error checking.
I am planning to add a new type to our local build of python for parsing
Unsigned Long Longs (64 bit numbers) that errrors if the number has more
than the cor