Reputation: 6633
http://docs.python.org/release/2.4.4/lib/typesseq-strings.html
The table says unsigned hexadecimal, my outputs are signed...
for a in words: # list of word
print '%x'%hash(a)
also http://codepad.org/Cvd0Bg2T
Upvotes: 1
Views: 137
Reputation: 21
The change appeared (or seemed to) in 2.6; in http://docs.python.org/release/2.5.4/lib/typesseq-strings.html, U find: ... x Unsigned hexadecimal (lowercase). in http://docs.python.org/release/2.6/library/stdtypes.html#string-formatting: ... 'x' Signed hexadecimal (lowercase).
Not a word about the change in 2.6 "whats new"
The new policy parts from the "printf" policy. while debuging C code, I used to have an ipython interpreter open, next to my gdb terminal, for address calculation. This doesnt work any more, and I find no easy turnaround.
Upvotes: 2