Exception as the primary error handling mechanism?

Phlip phlip2005 at gmail.com
Wed Jan 6 16:10:43 CET 2010


On Jan 5, 8:49 pm, Steven D'Aprano
<ste... at REMOVE.THIS.cybersource.com.au> wrote:

> > (A related question - why can't I just go 'if record = method():  use
> > (record)'. Why extra lines just to trap and assign the variable before
> > using it?)
>
> Because that idiom is responsible for probably the most common error in C
> of all, at least one of the most common errors. Thank goodness Python
> forbids such a dangerous construct.

switching = for == is the "most common error in C"?

I can't tell if you are joking.



More information about the Python-list mailing list