If your actual interest in defining a bit type is to work with an array of
bits, try Ilan Schnell's bitarray module
(http://pypi.python.org/pypi/bitarray/0.3.4).  It uses a compiled extension,
so it is quite fast and space-efficient.

Ilan gave a presentation on this at the Texas Unconference last fall, and
some of the applications were pretty interesting/novel.  If you download the
tarball from PyPI, there is an included examples directory.

-- Paul

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to