Hi!

LOPEZ GARCIA DE LOMANA, ADRIAN wrote:
> Hi all, 
> 
> I have a question with some code I'm writting:
> 
> 
> def main():
> 
>     if option == 1:
> 
>         function_a()
> 
>     elif option == 2:
> 
>         function_b()
> 
>     else:
> 
>         raise 'option has to be either 1 or 2'
> 
[snip]

One further note: string exceptions are being phased out. It is 
discouraged to use them. See

http://docs.python.org/lib/module-exceptions.html
http://www.python.org/peps/pep-0290.html

for details.

Cheers,

Carl Friedrich Bolz
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to