Why would I get a TypeEror?
Reinhold Birkenfeld
reinhold-birkenfeld-nospam at wolke7.net
Fri Jan 14 14:32:15 EST 2005
It's me wrote:
> Sorry if my question was a little "lazy" and yes, I was asking about the
> "lazy evaluation". :=)
>
> I am surprised about this (and this can be dangerous, I guess).
>
> If this is true, I would run into trouble real quick if I do a:
>
> (1/x,1.0e99)[x==0]
>
> and that's not good.
>
> Something to keep in mind. :-(
Lazy evaluation: use the (x==0 and 1e99 or 1/x) form!
Reinhold
More information about the Python-list
mailing list