Converting Unicode to integer

Max M maxm at
Wed Aug 28 08:46:34 CEST 2002

Nikola Plejic wrote:

> def handler(**kw):
>     a = txt.text
>     b = txt2.text
>     a = int(a)
>     b = int(b)
>     lbl.text = a + b

       lbl.text = str(a + b)

Unlike other languages Python does not automatically change the type for 
you. You will grow to appreciate this, as it can lead to some very 
subtle bugs that can be hard to catch later on.

regards Max M

More information about the Python-list mailing list