[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)
>>> oct(1L)
>>> bin(1L)

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>

More information about the New-bugs-announce mailing list