Implement C's Switch in Python 3

Christian Gollwitzer auriocus at gmx.de
Sun Feb 3 16:00:29 EST 2019


Am 03.02.19 um 09:32 schrieb DL Neil:
> Now back to ordinal dates - the "st", "th", etc suffixes only work in 
> English. You'd need another list (but no great coding complexity) to 
> cope with a second, third, ... language!

Only for some languages. In other languages there can be, for example, 
cases (inflections). Then the suffix not only depends on the number, but 
also on the case, which is governed by e.g. a preposition or the use in 
the sentence. Slavic languages have 6 or 7 cases.

Of course you can make the list two-dimensional to cover that, but then 
another language will appear which has yet another different thing....

Basically you'll need to rewrite the whole thing when going to a 
completely different language.

	Christian


More information about the Python-list mailing list