Need elegant way to cast four bytes into a long

John Machin sjmachin at lexicon.net
Sun Aug 10 02:00:04 EDT 2003


danb_83 at yahoo.com (Dan Bishop) wrote in message news:<ad052e5c.0308091449.551562ba at posting.google.com>...

> 
> One correct way of writing the expression without parentheses is 
> 
> a[0] | a[1] << 8 | a[2] << 16 | a[3] << 24

Sorry, Dan, I filed the patent application yesterday :-)




More information about the Python-list mailing list