Q about tail recursion

Robin Becker robin at jessikat.demon.co.uk
Mon Feb 28 18:23:00 EST 2000

In message <oqzosm8zs5.fsf at titan.progiciels-bpi.ca>, François Pinard
<pinard at iro.umontreal.ca> writes
>Robin Becker <robin at jessikat.demon.co.uk> writes:
>> I quite often want to use None as an exceptional return eg in the case of a
>> list returning function [] might be a legal return and None an illegal one.
>Yes, `None' is a Python natural for a "missing" result, and there are many
>cases where such are usefully represented and handled.
>> That way I can leave the error handling to the caller. I guess I should
>> really be raising an exception though to be truly pythonian.
>That might become too heavy (and probably slow), as "missing" is ubiquitous
>when handling statistical or experimental data, for example.
I agree about efficiency. I guess I could make my own error values eg
SeriesMissing or whatever.
Robin Becker

More information about the Python-list mailing list