[Python-Dev] Re: Masks in getargs.c (was: 2.3b1 release)
16 Apr 2003 20:11:27 +0200
> > I would still like to work on http://www.python.org/sf/595026
> > support for masks in getargs.c.
> > Jack requested that this change should be implement shortly after the
> > release of 2.3a2, but this is too late now as it seems ;-)
> > What to do?
> Do it ASAP.
Ok, working on it.
> > Implement it now and commit it after 2.3b1 is released, or delay this
> > until 2.3 final is released. I have to admit that I'm sure I can
> > implement it for 32-bit Windows, but it would have to be tested (and
> > maybe completed) on other, especially 64-bit platforms as well.
> If you can get something rough into 2.3b1, it can be improved while
> 2.3b2 is cooking.
> > And it introduces incompatibilities.
> What kind? I thought it would be a new format code?
Two new format codes ('k' and 'K'), and changes to existing format
codes - per your request:
| How about the following counterproposal. This also changes some of the
| other format codes to be a little more regular.
| Code C type Range check
| b unsigned char 0..UCHAR_MAX
| B unsigned char none **
| h unsigned short 0..USHRT_MAX
| H unsigned short none **
| i int INT_MIN..INT_MAX
| I * unsigned int 0..UINT_MAX
| l long LONG_MIN..LONG_MAX
| k * unsigned long none
| L long long LLONG_MIN..LLONG_MAX
| K * unsigned long long none
| * New format codes.
| ** Changed from previous "range-and-a-half" to "none"; the
| range-and-a-half checking wasn't particularly useful.
> > BTW: Since you want to release a beta version, what's the state of the
> > FutureWarning about hex/oct constants: will this stay the way it is?
> Probably, unless you hve a better idea. :-(
I haven't used warnings very much, but is there a possibility to disable
them per module? You get a lot of them if you 'import win32con' for