[New-bugs-announce] [issue3186] bin(long) doesn't have a trailing 'L'

Mark Dickinson report at bugs.python.org
Tue Jun 24 10:55:48 CEST 2008


New submission from Mark Dickinson <dickinsm at gmail.com>:

In Python 2.6, for a long n, hex(n) and oct(n) have a trailing 'L', while 
bin(n) does not:

>>> hex(1L)
'0x1L'
>>> oct(1L)
'01L'
>>> bin(1L)
'0b1'

I'm guessing that this is intentional, and that the only reason hex(n) and 
oct(n) still have a trailing 'L' is backwards compatibility, but I thought 
I'd better check.

----------
assignee: rhettinger
messages: 68672
nosy: marketdickinson, rhettinger
severity: normal
status: open
title: bin(long) doesn't have a trailing 'L'
versions: Python 2.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3186>
_______________________________________


More information about the New-bugs-announce mailing list