Pascal int()

Michal Bozon bozon at natur.cuni.cz
Fri Mar 17 08:57:53 EST 2000


Hi.

I want to have a function (of course in Python) equivalent to Pascal
function int(). (It increments an integer stored in argument by 1).

This should do folowwing:

>>> i = 10
>>> int(i)
>>> i
11

eventually:

>>> i = 10
>>> int(i, 2)
>>> i
12

I have no idea how to do it.

Thanks,

Michal Bozon
bozon at natur.cuni.cz




More information about the Python-list mailing list