Dennis Heuer <[EMAIL PROTECTED]> wrote: > > OK, let's get back to the bitarray type. To first be clear about the > *type* of bitarray: The type I talk about is really a *bit*-array and > not a *bytewise*-array, as most developers seem to think of it. The > array doesn't provide the boolean manipulation of single bytes in the > array, it provides the manipulation of single bits or slices of bits in > a bit sequence of unlimited length. Think of it like of a data sequence > for a touring mashine (just bits).
Rather than trying to force bitarrays into longs (which will actually tend to be much slower than necessary), you could use actual arrays (using 8, 16, or 32 bit integers), and just mask the final few bits as necessary. See this post: http://lists.copyleft.no/pipermail/pyrex/2005-October/001502.html for a sample implementation in Python. - Josiah _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com