[Tutor] Array pointers

Alan Gauld alan.gauld at freenet.co.uk
Thu Jan 6 19:57:00 CET 2005


> Pixels - just ones and zeroes? Pack them as integers and apply the 
> right shift operator:
> i>>=1

But you have to remember to overflow right hand ones into 
the next integer if there are more than 32 bits...

Although Python long integers migfht work, dunno what the 
speed of shifting a long integer is in Python.. hmmm must 
try it!

Alan G.


More information about the Tutor mailing list