On Fri, 01 Jan 2010 02:43:21 -0800, Jonathan Gardner wrote:
> On Jan 1, 12:43 am, [email protected] (Aahz) wrote:
>> In article <[email protected]>,
>> Benjamin Kaplan <[email protected]> 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