Overflow error when printing long values

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Fri Aug 31 10:01:44 EDT 2001


Fri, 31 Aug 2001 02:12:57 -0400, Tim Peters <tim.one at home.com> pisze:

> If you want something that works under all Python releases (to date
> ...), print
> 
>     repr(l)[:-1]  # chops off trailing 'L'

It will break when ints are longs are unified, so don't stay with
this too long and switch to str(l) when Python versions which appended
'L' to str can be considered obsolete.

-- 
 __("<  Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK



More information about the Python-list mailing list