Correction: Pascal inc(), not int()

Michal Bozon bozon at natur.cuni.cz
Fri Mar 17 09:39:43 EST 2000


On Fri, 17 Mar 2000, Michal Bozon wrote:

> Hi.
> 
> I want to have a function (of course in Python) equivalent to Pascal
> function inc(). (It increments an integer stored in argument by 1).
> 
> This should do folowwing:
> 
> >>> i = 10
> >>> inc(i)
> >>> i
> 11
> 
> eventually:
> 
> >>> i = 10
> >>> inc(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