Question about None
rhodri at wildebst.demon.co.uk
Sat Jun 13 17:22:14 EDT 2009
On Sat, 13 Jun 2009 21:25:28 +0100, John Yeung
<gallium.arsenide at gmail.com> wrote:
>> > But mathematically speaking, it's intuitive that
>> > "nothing" would match any type.
>> Completely wrong. The concept you're thinking of in
>> denotational semantics is called "bottom", but bottom
>> is not a value that functions can compute and return.
>> It is really the absence of a value.
> I've never heard a mathematician use the term "bottom". It certainly
> could be that I just haven't talked to the right types of
> mathematicians. I'm not sure it's even relevant. "Denotational
> semantics" is specific to computer science. My point was simply that
> even an elementary understanding of mathematics (and I'll grant a
> naive understanding of computer science as well) might lead someone to
> think that it *might* make sense for None to be the name for nothing.
Such an understanding would be clearly wrong in the context in which we
were talking (and denotational semantics is a branch of category theory,
which is not specific to computer science if you don't mind). If None
is nothing, then it can't be a string, int, float or anything else,
because they're all something.
Rhodri James *-* Wildebeest Herder to the Masses
More information about the Python-list