On 2020-09-28 06:51, Chris Angelico wrote:
On Mon, Sep 28, 2020 at 3:33 PM Christopher Barker <python...@gmail.com> wrote:
As for using an empty tuple, thanks Guido for laying out the logic so succinctly, and it 
does make it pretty simple that only the one index case is special. Nevertheless, I think 
most folks expect the special case to be at the end of the "series", not in the 
middle -- i.e.

four is the same as three is the same as two, one is special, and zero is not 
allowed.

rather than

four is the same as three is the same as two, one is special, and zero is the 
same as two, three, four, ...

For that reason, I prefer a separate sentinel.


English treats 1 as special and 0 as the same as other numbers when it
comes to singulars and plurals. You talk about "an item", but "no
items" or "two items" or "three items". As you descend through the
numbers, four ("items") is the same as three ("items") is the same as
two ("items"), and one is special ("item"), and zero is back to the
normal case ("items").

I'm not saying that English should be the fundamental basis upon which
Python is designed, but at least there's some precedent :) What do
other languages do in this way? Are other human languages based around
the idea that zero matches others, or are there different ways to
write things?

Dutch is, of course, of particular interest here :)

Some languages have singular, dual, and plural.

Some languages use the singular if the number ends with 1, so "20 items", "21 item", "22 items".

I believe I read somewhere that some languages are OK with "found 2 files" and "found 1 file", but reject "found 0 files"; it has to be "didn't find any files".

And some languages don't inflect for number at all.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/TDTNTMDYNCRUAVKQKQV4DZBUWGKGJDPI/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to