[Python-Dev] hey, who broke the array module?

Trent Mick trentm@activestate.com
Thu, 18 May 2000 13:38:59 -0700

On Thu, May 18, 2000 at 03:49:59PM -0700, Guido van Rossum wrote:
> Maybe we can come up with a modifier for signed or unsigned range
> checking?

Ha! How about 'u'? :) Or 's'? :)

I really can't think of a nice answer for this. Could introduce completely
separate formatter characters that do the range checking and remove range
checking from the current formatters. That is an ugly kludge. Could introduce
a separate PyArg_CheckedParse*() or something like that and slowly migrate to
it. This one could use something other than "L" for LONG_LONG.

I think the long term solution should be:
 - have bounds-checked signed and unsigned version of all the integral types
 - call then i/I, b/B, etc. (a la array module)
 - use something other than "L" for LONG_LONG (as you said, q/Q maybe)

The problem is to find a satisfactory migratory path to that.

Sorry, I don't have an answer. Just more questions.


p.s. If you were going to check in my associate patch I have a problem in the
tab usage in test_array.py which I will resubmit soon (couple of days).

Trent Mick