Re: Implement C's Switch in Python 3 [OT languages]

2019-02-07 Thread Christian Gollwitzer

Am 05.02.19 um 02:20 schrieb DL Neil:
So, even with the French making their dates into sentences, not a single 
one uses ordinals!
- did the computer people in all these languages/cultures decide that 
the more numeric approach was better/easier/...

(ie simpler/less-complex)


:)

For the two languages I know well, German (mother tongue) and Czech 
(studied for 5 years, 1 year abroad in Prague) I can assure you that the 
numeric ordinals were not dicated by the computer people, but that's 
been the typographic tradition since ever. You write the number with a 
period, also for dates. In regular sentences, something like "he 
achieved the eigth placement in a tournament" it depends on the size of 
the number, below ten or twelve one usually spells it out (with 
inflection and everything) and above it's typically written with numbers 
and a period.


But I read a funny story at the Czech language instutute's page about 
the influence of MS Word on Czech spelling. In dates, the name of the 
month is written in lowercase "1. prosince". Howver, MS Word thinks that 
the period is a full-stop which starts a new sentence, and it 
autocorrects it to "1. Prosince". This has happened so often that they 
brought it up as a special topic, that this autocorrection is wrong.



Not even the convention/use of title-case is consistent!


Title case? In German, there are intricate rules about the 
capitalization in regular sentences; there is no such thing as title 
case. Only very rarely ALL CAPS are used.


Have a good sleep ;)

Christian
--
https://mail.python.org/mailman/listinfo/python-list


Re: Implement C's Switch in Python 3 [OT languages]

2019-02-04 Thread DL Neil

On 4/02/19 9:25 PM, Christian Gollwitzer wrote:

Am 04.02.19 um 09:18 schrieb Christian Gollwitzer:
I think English is quite "unique" with writing out the ending of the 
ordinals attached to arabic numerals.




Of course, there is a Wikipedia page about it:

 https://en.wikipedia.org/wiki/Ordinal_indicator

So I was wrong and the abbreviated suffix is as common as the period 
over the European languages.


 Christian



That's a comprehensive read. Thanks!

Left me with a few thoughts:
1 the Irish is "syncopated". No wonder that accent presents me with 
difficulties!

2 this is all very difficult, and
3 the OP must be re-thinking his choices (or questioning his sanity) by now!

Following your earlier contribution and its use of words such as "rare", 
"unusual", "mess", and "unique" I wondered just how relevant the ordinal 
might be?


Herewith a few minutes of very un-scientific/statistically-irrelevant 
discovery - wherein I learned that English investors are leery of 
Alphabet because of their rate of investment (!?) and the Portuguese are 
concerned that their schools' computers are aged-rubbish.


I surveyed a number of the better-known European news-papers' web-sites 
to see what they do (under the (perhaps mistaken) assumption that they 
represent their country's use of dates):-


Great Britain
The Times (of London) February 5 2019, 12:01am,

French (translations: 'published on-site at...', 'published on the...')
Le Monde avec AFP Publié hier à 08h06, mis à jour hier à 12h08
Publié le 14 janvier 2019 à 15h04 - Mis à jour le 14 janvier 2019 à 16h03
Le Figaro: Publié le 04/02/2019 à 19:45

Germany
Handelsblatt Dienstag, 5. Februar 2019 (also FAZ)
Welt  Stand: 01.02.2019 | Lesedauer: 4 Minuten
Bild 05.02.2019

Italy
la Repubblica 05 Febbraio 2019

Portugal
Diário de Notícias Terça-feira, 5 de fevereiro de 2019
Publico 4 de Fevereiro de 2019

Spain
El País 5 FEB 2019
El Mundo martes, 5 de febrero de 2019


So, even with the French making their dates into sentences, not a single 
one uses ordinals!
- did the computer people in all these languages/cultures decide that 
the more numeric approach was better/easier/...

(ie simpler/less-complex)

Not even the convention/use of title-case is consistent!


After all this, I think I need to quietly go away and sleep it off...
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list


Re: Implement C's Switch in Python 3 [OT languages]

2019-02-04 Thread Christian Gollwitzer

Am 04.02.19 um 09:18 schrieb Christian Gollwitzer:
I think English is quite "unique" with writing out the ending of the 
ordinals attached to arabic numerals.




Of course, there is a Wikipedia page about it:

https://en.wikipedia.org/wiki/Ordinal_indicator

So I was wrong and the abbreviated suffix is as common as the period 
over the European languages.


Christian
--
https://mail.python.org/mailman/listinfo/python-list


Re: Implement C's Switch in Python 3 [OT languages]

2019-02-04 Thread Christian Gollwitzer
Am 04.02.19 um 04:11 schrieb DL Neil: > On 4/02/19 10:00 AM, Christian 
Gollwitzer wrote:

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.


I was unaware of that - not having had to cope with any of the Slavic 
languages, to-date. Are multiple cases/inflections used for dates? 
French has two, including both male and female ordinals, but only one 
applies to dates!




There is good and bad news ;) Bad news first: The Slavic languages have 
a noun inflection system close to the Proto-Indoeuropean one. There are 
3 genders (male, female, neutral), two numbers (singular, plural) and 6 
or 7 cases, depending on the language (indicating the function, 
nominative = subject, accusative = mostly object, locative = indicating 
a position in space, ).


A numeral or ordinal can/must take any of those 3x2x7 forms in 
accordance to the noun it refers to.


Now the good news: for dates usually there is a fixed format which 
significantly reduces this. I am fluent in Czech, and there, almost 
exclusively the genitve case is used for dates.


"prvniho cervence", literally translating "of the first July", is used 
almost anywhere, like

"at the first of July", "prvniho cervence"
"until the first of July" = "az do prvniho cervence",
"from the first of July on" = "od prvnhio cervence".

Only in rare circumstances, the first case is used

"Prvni cervenec je den meho narozeni" = "the first of July is my birthday"

Now the even better news: In written form, spelling out the ordinals is 
very unusual. Usually, it is just indicated by a period, so all of the 
above could be written "1. 6.". This is also the standard way to write 
it in German. But it becomes a mess if you want to attach the day of the 
week, because then you need to take into account the preposition and the 
position in the sentence.



I think English is quite "unique" with writing out the ending of the 
ordinals attached to arabic numerals.



However, such limitation also applies to the 'case solution', and worse, 
if that additional language/those languages' exceptions apply to 
different values, eg 1st, 11th, 2nd, 3rd which are "hard-coded" in the 
English convention.


yes of course. True I18N is very hard, I'm glad that we just don't need 
to do it ;)



Christian
--
https://mail.python.org/mailman/listinfo/python-list