unsigned ints and operator.rshift

Joe Connellan joec at mill.co.uk
Mon Jul 22 10:34:42 EDT 2002


I'm storing info in an int (32bits) that I'm wanting to shift left and
right using operator.[l|r]shift the problem is that because the int is
signed rshift fills in 1's rather than 0's on negative numbers - is
there any way to store the 32bits as an unsigned int do get around this?

thanks

Joe





More information about the Python-list mailing list