> >      try:
> >          if int(text) <= 0: raise ValueError
>
> Hmm, I'm actually not so sure about this line now. It doesn't seem right
> to raise a ValueError when the result of the expression is negative,
> because even though it's a problem for my program, it isn't really a
> "ValueError," right?

It's an invalid value to your program, so yes, it is a ValueError.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to