In <[EMAIL PROTECTED]>, aine_canby
wrote:

> elif uniList[0].lower() in ("p","pass"):
>       break
> elif int(uniList[0]) in range(0,10):

Replace this line with:

elif uniList[0].isdigit() and 0 <= int(uniList[0]) < 10:

>         verb.SetImportance(int(uniList[0]))
>         break
> else:
>         verb.AddNewVerb((uniList[0])

You may want to give `uniList[0]` a name before entering the
``if``/``elif`` construct to avoid accessing the first element over and
over.

Ciao,
        Marc 'BlackJack' Rintsch
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to