int() built-in and hex "0x..." strings

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Mon Jul 23 14:43:43 EDT 2001


Mon, 23 Jul 2001 11:07:57 -0700, Bruce Edge <bedge at troikanetworks.com> pisze:

>>>> int('0x80')                                                                                          

> Is there another int() type lib func that I should use instead?

int('0x80', 0) == 128
int('80',   0) == 80

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



More information about the Python-list mailing list