translating foreign data

Peter J. Holzer peter.j..holzer at 1
Sat Jun 23 17:05:48 EDT 2018


From: "Peter J. Holzer" <hjp-python at hjp.at>


--p4u6dkqn7e5fhtwt
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2018-06-23 08:41:38 -0400, Richard Damon wrote:
> On 6/23/18 8:28 AM, Peter J. Holzer wrote:
> > On 2018-06-23 08:12:52 -0400, Richard Damon wrote:
> >> On 6/23/18 7:46 AM, Steven D'Aprano wrote:
> >>> If I'm in Australia, using the en-AU locale, nevertheless I can gener=
ate=20
> >>> a file using , as a decimal separator. Try and stop me :-)
> >> yes, you can MIS-use the en-AU locale and write 1,000 to mean the numb=
er
> >> One, just as you can misuse the language and write cat when you mean a
> >> member of the Canine group, but then the misinterpretation is on the
> >> creator of the document, not on the program that was told how the
> >> document is to be read.
> > How would he mis-use the en-AU locale to write 1 as "1,000"? I think
> > to do that he would simply NOT use the locale.
> Once you open the Locale can of worms, EVERYTHING has a locale, to say
> you aren't using a locale is to say you are writing
> something unintelligible, as you can thing of the locale as the set of
> rules to interpret

I don't think that's a useful way to look at it. "Locale" in (non-technical)
English means "place" or "site". The idea behind the locale concept is that
some conventions (e.g. how to write numbers or how to write strings) depend on
the place where the program runs (or maybe where the user is sitting or grew up
 or maybe where a file was produced).

For stuff which doesn't depend on the place (e.g. how a Python program should
be parsed), the locale concept doesn't apply.


> > You two also seem to be writing about different things when you write
> > "THE locale". Steven seems to mean the global settings a user has
> > chosen, you seem to mean the specidic settings appropriate for parsing a
> > specific file.

While I was writing this paragraph I realized that I had also used "the locale"
 in a specific meaning in the previous paragraph. I decided to let it stand and
 see whether anyone would call me out it.

> You have THE locale for a given piece of data.

Well, you didn't. Even though I quite obviously used "the locale" in Steven's
meaning, you didn't react to that at all and just continue as if your
definition is the only possible one.

        hp

--=20
   _  | Peter J. Holzer    | we build much bigger, better disasters now
|_|_) |                    | because we have much more sophisticated
| |   | hjp at hjp.at         | management tools.
__/   | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/>

--p4u6dkqn7e5fhtwt
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAlsuU7kACgkQ8g5IURL+
KF308BAAkxEOzzNfnaRez6RwpTWGI7CbWb5HK8B8mmn+AoAo788Cj+yQYE0CEUbG
HBM0UPtc44ZqSrvIcyXlmL6xjUzkuPOYUZbtxVunWQm3NLgaViHf3b+1uSqsapYT
jqQo+LbQiENqPrroSjqWmOKpo3B5T9m7howPuvGMCBRV7B/CriOnVwYjrolo02JL
gcdcLPPyN4tGHhWFvMN6xycLS5m/bC4do8yRz/GPzRT/IoEI4gmKbk/10pzEK7iH
s3V+P74uznvR8B4PxCPNCWiI9LJD61K+u1qhdrmg+7XPHHqr/04GiPFZ2JHSthhG
joRP0UdlbTs+esELjUhrN7Xcd+Z1qlA9N86ULXv5QA0YaDCUXNhjOEkLAzOpx9Af
XWcmnVfaHePxhqIKHvo5tsx/eEdLRttiScw11UoAvyNmFHW9oiVZhP0za6GgiiHr
jXNOcC5uDTpisi3TsR8jV/MhBwGc01up6JMkVnCIXArGneZAeTDVocQrp99IDg4z
bGLoSeSafqH0Xxzv+f0UomOrvTlCV011Tst/rn94EkI3SonNq6/0TxLVO5da/Jj+
626iYqQcqk7vzF5cL8umtYDe78oRdycvJcxMmfheORuCiLTWLbYYi+0nHmo3q35F
/bfsla74h5ysvuJAyNLNCBoamziZvK/b35j9CQzLLN86QQNntdI=
=HQTI
-----END PGP SIGNATURE-----

--p4u6dkqn7e5fhtwt--

--- BBBS/Li6 v4.10 Toy-3
 * Origin: Prism bbs (1:261/38)



More information about the Python-list mailing list