Guido: > In Python 2.4, the recommended way will be to write 0xffffffff and not > worry about the fact that it's a positive long; Yes, it won't be so much of an issue then. But you can still get a negative long from a positive one when bit twiddling by complementing, meaning that you have to remember to mask the result before displaying it as hex, or end up with a hex representation that displays the bit pattern in a way that's hard to interpret. That's the usage I had in mind when I mentioned the 1x notation -- for display, not for input. But thinking about it now, it would be better to provide a new function for hexifying that you could tell how many bits you're interested in, and it would show you that many, unsigned. Maybe also a new format operator for this as well. Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg@cosc.canterbury.ac.nz +--------------------------------------+
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4