Subclassing int for a revolving control number
Christopher T King
squirrel at WPI.EDU
Tue Jul 20 14:33:30 EDT 2004
On Tue, 20 Jul 2004, Calvin Spealman wrote:
> Personally, rather than all these suggestions of python-written classes or
> of itertools.cycle, I would like a C-extension module with something like
> this. All it would have to be is an actually C int value with no bounds
> checking. This would be usually for working with low-level data, like
> bitmaps or compressed data, where you can't have longs and where you need
> good performance on simple arithmetic.
numarray does this:
>>> from numarray import *
>>> array(254,UInt8)+4
2
It also greatly speeds up performance on the vector operations needed in
processing bitmaps, etc.
More information about the Python-list
mailing list