[Python-Dev] Bool type and arrays

Paul F Dubois paul@pfdubois.com
Fri, 8 Mar 2002 09:26:21 -0800


Guido said not to "mix up" the question of bit arrays with the bool
proposal, but really, they *are* mixed up. The minute there is a bool
type in Python people will be able to make Numeric arrays (not to
mention Python arrays) with elements of type "bool". They will then be
annoyed to learn that they are making arrays of objects and the result
is a big array, not a small array, and that they would have been better
off with our byte integer arrays. Depending on the implementation,
mixing in bool values in a list of integers might persuade Numeric's
array constructor to make them all objects.

In short, they are mixed up in the sense that this proposed intellectual
nicety will cause us Nummies a lot of grief. Not that you aren't allowed
to give us grief, like you did with the "true division", but I wanted
people to know they would be inflicting pain.

BTW: There is quite a bit of pent-up demand in the Numeric community for
bit arrays. However, nobody knows how to do it since the internal Numpy
structures use a byte as the atomic unit of addressing.