5 ms·
I just got this... > "Türkiye".capitalize() UniquenessError("Ankara is already the capital")
by devoutsalsa 4y ago
I just got this...
> "Türkiye".capitalize()
UniquenessError("Ankara is already the capital")
- eesmith 4y agoSomething's wrong with your implementation. That shouldn't be a uniqueness constraint as a country may have multiple capitals. https://en.wikipedia.org/wiki/List_of_countries_with_multiple_capitals#More_than_one_capital_at_present https://en.wikipedia.org/wiki/List_of_countries_with_multipl... Also, "Nauru".capitalize() should succeed as it has no official capital. (tongue firmly in cheek ;)
- zinekeller 4y agoCan someone help me? Is this an error? "Switzerland".capitalize() "HELVETICA"
- throw0101a 4y agoSwitzerland has four official languages, with the English word "Switzerland" having a particular translation to each one. But if you choose a single official name in one of those languages, it is not fair to the others, so in addition an official name in each language, they have an official in a 'neutral' language: Latin. > Due to its linguistic diversity, Switzerland is known by a variety of native names: Schweiz [ˈʃvaɪts] (German);[note 5] Suisse [sɥis(ə)] (French); Svizzera [ˈzvittsera] (Italian); and Svizra [ˈʒviːtsrɐ, ˈʒviːtsʁɐ] (Romansh).[note 6] On coins and stamps, the Latin name, Confoederatio Helvetica – frequently shortened to "Helvetia" – is used instead of the four national languages. * https://en.wikipedia.org/wiki/Switzerland https://en.wikipedia.org/wiki/Switzerland That's also why the ccTLD of Switzerland is .ch. What you're seeing may be an 'artifact' of that.
- pyuser583 4y agoYeah lots of people confuse that domain for China.
- eesmith 4y agoOdd. I get: "Switzerland".capitalize() 𝔈ℑ𝔇𝔊𝔈𝔑𝔒𝔖𝔖𝔈𝔑𝔖ℭℌ𝔄𝔉𝔗 Maybe my locale is messed up?
- devoutsalsa 4y agoAre you in china? That looks like Canton-ese.
- eesmith 4y agoIt's a thread of jokes. devoutsalsa started with a joke mixing the two meanings of "capital" using a fake example. I joked that "UniquenessError" isn't the right error, as some countries have more than one capital and two countries have no official capital. One of those two is Switzerland, which has the official Latin name "Confoederatio Helvetica", leading zinekeller joke that the capital form was "HELVETICA". See https://en.wikipedia.org/wiki/Name_of_Switzerland https://en.wikipedia.org/wiki/Name_of_Switzerland . I pretended my implementation of that non-extent programming language generated "Eidgenossenschaft", see https://en.wikipedia.org/wiki/Eidgenossenschaft https://en.wikipedia.org/wiki/Eidgenossenschaft . As that's a German word, I decided to use a blackletter typeface, specifically, the Fraktur in Unicode which is meant to encode mathematical alphanumeric symbols, then imply that my locale the reason I got a German word.
- roxymusic1973 4y ago...and Switzerland is divided into cantons :)
- cardiffspaceman 4y agoIt looks like Fraktur to me. https://en.wikipedia.org/wiki/Fraktur https://en.wikipedia.org/wiki/Fraktur
- eesmith 4y agoGot it in one.
- dane-pgp 4y agoI think you don't have the right fonts installed.
- daveslash 4y agoI can't tell if you're joking or not! :-o What language/framework is this in? Edit: I now understand this to be a joke. But.., given the craziness that I've seen in the past, this doesn't seem out of the realm of plausibility!
- skissane 4y ago> That shouldn't be a uniqueness constraint as a country may have multiple capitals And, in theory, two countries could share the same capital (as a condominium which is equal joint territory of both, or some kind of third territory belonging to neither), although I'm not aware that's ever actually happened. But, at the subnational level, it has happened in India – Chandigarh is the joint capital of two Indian states (Punjab and Chandigarh), each of which has it as its capital despite it being in neither of them, as well as being a union territory (and hence also capital of itself).
- cachvico 4y agoIsrael and Palestine.
- Smoosh 4y agoMine says: > "Türkiye".capitalize() PrivacyError("That's nobody's business but the Turks'")