Of course - my apologies, I was being an idiot.
On Thu, 20 Aug 2009 14:38:08 -0700, Simon Forman <sajmik...@gmail.com>
wrote:
On Aug 20, 5:18 pm, "Rami Chowdhury" <rami.chowdh...@gmail.com> wrote:
> val = val.encode('hex')
That's the crucial line -- it's returning a new integer, which you are
re-binding to val. If you then did:
No, it returns another string, which still isn't the decimal
representation of the hex string. hex C => decimal 12
In [1]: '0C'.encode('hex')
Out[1]: '3043'
--
Rami Chowdhury
"Never attribute to malice that which can be attributed to stupidity" --
Hanlon's Razor
408-597-7068 (US) / 07875-841-046 (UK) / 0189-245544 (BD)
--
http://mail.python.org/mailman/listinfo/python-list