On Fri, 01 Jan 2010 02:43:21 -0800, Jonathan Gardner wrote: > On Jan 1, 12:43 am, a...@pythoncraft.com (Aahz) wrote: >> In article <mailman.300.1262323578.28905.python-l...@python.org>, >> Benjamin Kaplan <benjamin.kap...@case.edu> wrote: >> >In Python, throwing exceptions for expected outcomes is considered >> >very bad form [...] >> >> Who says that? I certainly don't. > > Agreed. > > int("asdf") is supposed to return what, exactly? Any language that tries > to return an int is horribly broken.
[sarcasm] No no, the right way to deal with that is have int("asdf") return some arbitrary bit pattern, and expect the user to check a global variable to see whether the function returned a valid result or not. That's much better than catching an exception! [/sarcasm] -- Steven -- http://mail.python.org/mailman/listinfo/python-list