Re: Python style guidelines
In article <c2rafr$21ftn5$ 1@ID-169208.news.uni-berlin.de>,
"Greg Ewing (using news.cis.dfn.de )" <wmwd2zz02@snea kemail.com> wrote:[color=blue]
>John Roth wrote:[color=green]
>> I suspect that's a rather common error. I'd much prefer
>> that both find and index return an object that acted like
>> a number but returned the logically correct response when
>> queried as a boolean: true for zero and false for -1.[/color]
>
>Good heavens, no! That would be a *massively* dangerous
>object to have floating around in one's program...[/color]
*Most* of them wouldn't float very far.. I presume that
when you did arithmetic on one of them, the magic wouldn't
metastatize to the result. So when one did escape from the
find/index context it would be the last thing anybody
expected.
Regards. Mel.
ob. c.l.p. fear, surprise
In article <c2rafr$21ftn5$ 1@ID-169208.news.uni-berlin.de>,
"Greg Ewing (using news.cis.dfn.de )" <wmwd2zz02@snea kemail.com> wrote:[color=blue]
>John Roth wrote:[color=green]
>> I suspect that's a rather common error. I'd much prefer
>> that both find and index return an object that acted like
>> a number but returned the logically correct response when
>> queried as a boolean: true for zero and false for -1.[/color]
>
>Good heavens, no! That would be a *massively* dangerous
>object to have floating around in one's program...[/color]
*Most* of them wouldn't float very far.. I presume that
when you did arithmetic on one of them, the magic wouldn't
metastatize to the result. So when one did escape from the
find/index context it would be the last thing anybody
expected.
Regards. Mel.
ob. c.l.p. fear, surprise
Comment