Q about tail recursion
François Pinard
pinard at iro.umontreal.ca
Fri Mar 3 21:35:07 EST 2000
Robin Becker <robin at jessikat.demon.co.uk> écrit:
> François Pinard> <pinard at iro.umontreal.ca> writes:
> > `None' is a Python natural for a "missing" result [...]
> I agree about efficiency. I guess I could make my own error values eg
> SeriesMissing or whatever.
I guess one could also write `missing = None', and use `missing' instead,
for clarity.
In one application I wrote (a firewall generator, in fact), a set of
variables occur all around to represent various restrictions. When there
is no restriction (or if you prefer, when the restriction is "missing"),
I use the value `None'. But using the word `None' to mean there is no
restriction is confusing, as it suggests that "None is allowed", while the
connotation should rather be that "Any is allowed". So I picked `Any' as
a kind of more legible keyword. At the beginning of the program, there is:
Any = None
which surely looks a bit surprising, at first. :-)
--
François Pinard http://www.iro.umontreal.ca/~pinard
More information about the Python-list
mailing list