Sept. 30, 2014
8:06 p.m.
On Tue, Sep 30, 2014, at 15:31, Terry Reedy wrote:
If groups were stored in a list, then technically, yes, not if groups are stored in a dict to support named groups with just one structure.
Longs work fine interchangeably with ints in a dict. And even if they didn't, the group function _could_ convert a small-valued long argument to an int. This is an error raised by a function implemented in C that forces a static type checking on its arguments. The core problem is that the PyInt_AsLong function does not check (and handle) the case that its argument is a small-valued PyLong.