$ python
Python 2.7.5 (default, Aug 25 2013, 00:04:04)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 0xff0000ff
4278190335
>>> hex(0xff0000ff)
'0xff0000ff'
>>>

Looks like it's an unspecified behavior!


On Fri, May 9, 2014 at 1:05 PM, Jeff Allen <report@bugs.jython.org> wrote:

Jeff Allen added the comment:

0xff0000ff *is* a long. Are you perhaps comparing with Python 3?

>python
Python 2.7.6 (default, Nov 10 2013, 19:24:24) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> 0xff0000ff
4278190335L
>>> hex(0xff0000ff)
'0xff0000ffL'
>>> format(0xff0000ff, "#x")
'0xff0000ff'
>>>

----------
nosy: +jeff.allen

_______________________________________
Jython tracker <report@bugs.jython.org>
<http://bugs.jython.org/issue2138>
_______________________________________



--
Jonathan Feinberg  jdf@pobox.com  http://MrFeinberg.com/