Re: [Python-Dev] Python 3.5 now uses surrogateescape for the POSIX locale

2014-03-18 Thread Atsuo Ishimoto
Hello,

2014-03-18 18:13 GMT+09:00 Victor Stinner :

> I'm not against backporting the change in Python 3.4.1. It can be seen
> as a bugfix. I don't think that anyone wants a Unicode error when
> reading or printing non-ASCII data from stdin/to stdout. But I would
> like the opinion of other developers before doing that.

FYI: Guido was opposed to change error handler of stdin and stdout years ago.

http://bugs.python.org/issue2630#msg65493

> Amaury: I think it would be okay to use backslashreplace as the default
> error handler for sys.stderr.  Probably not for sys.stdout or other
> files, since I'm sure many users prefer the errors when their data
> cannot be printed rather than silently writing \u escapes that might
> cause other code reading their output to choke.  For sys.stderr though I
> think not having exceptions raised when attempting to print errors is
> very valuable.


-- 
Atsuo Ishimoto
Mail: ishim...@gembook.org
Twitter: atsuoishimoto
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Import and unicode: part two

2011-01-21 Thread Atsuo Ishimoto
On Fri, Jan 21, 2011 at 5:45 PM, Stephen J. Turnbull  wrote:
> Nick Coghlan writes:
>  > On Fri, Jan 21, 2011 at 3:44 PM, Atsuo Ishimoto  
> wrote:
>
>  > > I don't want Python to encourage people to use non-ascii module names.
>
> I don't think anybody is *encouraging* it.  The argument is for
> *permitting* it, partly for consistency with other identifiers, and
> partly because of Python's usual "consenting adults" standard for
> permitting "dangerous" practices.

I'm sorry, I was not clear. I was afraid that saying "learning
opportunity" tempt people to try non-ASCII module names.
In these days, even non technical people have access to Windows, Mac
and Linux boxes at a time. So chances to be annoyed with broken
non-ASCII named files are pretty common.

>
> I still don't see this as a reason to give up on non-ASCII module
> names.  Just have the documentation warn that many non-ASCII names
> will be non-portable, so use on multiple systems will require care
> (maybe gloss that with "probably more care than you want to take").
>
Nice gloss.

-- 
Atsuo Ishimoto
Mail: ishim...@gembook.org
Blog: http://d.hatena.ne.jp/atsuoishimoto/
Twitter: atsuoishimoto
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Import and unicode: part two

2011-01-21 Thread Atsuo Ishimoto
On Fri, Jan 21, 2011 at 2:59 PM, Nick Coghlan  wrote:
>
> These all sound like good reasons to continue to *advise* against
> using non-ASCII module names. But aside from that, they sound exactly
> like a lot of the arguments we heard when Py3k started enforcing the
> bytes/text distinction more rigorously: "you're going to break
> stuff!".

No, non-ASCII module names are new breakage you are going to introduce now :)
If the advice against using non-ASCII module names is reasonable, why
bother supporting them?

>
> Yes, we know. But if core software development components like Python
> don't try to improve their Unicode support, how is the situation ever
> going to get better?
>

Java, a leading language of IT industry, have already support
non-ASCII class files for years. But I've never seen such files in
production in Japan, and didn't improve situation until now.

-- 
Atsuo Ishimoto
Mail: ishim...@gembook.org
Blog: http://d.hatena.ne.jp/atsuoishimoto/
Twitter: atsuoishimoto
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Import and unicode: part two

2011-01-21 Thread Atsuo Ishimoto
On Fri, Jan 21, 2011 at 1:46 AM, Guido van Rossum  wrote:
> On Thu, Jan 20, 2011 at 5:16 AM, Nick Coghlan  wrote:
>> On Thu, Jan 20, 2011 at 10:08 PM, Simon Cross
>>  wrote:
>>> I'm changing my vote on this to a +1 for two reasons:
>>>
>>> * Initially I thought this wasn't supported by Python at all but I see
>>> that currently it is supported but that support is broken (or at least
>>> limited to UTF-8 filesystem encodings). Since support is there, might
>>> as well make it better (especially if it tidies up the code base at
>>> the same time).
>>>
>>> * I still don't think it's a good idea to give modules non-ASCII names
>>> but the "consenting adults" approach suggests we should let people
>>> shoot themselves in the foot if they believe they have good reason to
>>> do so.
>>
>> I'm also +1 on this for the reasons Simon gives.
>
> Same here. *Most* code will never be shared, or will only be shared
> between users in the same community. When it goes wrong it's also a
> learning opportunity. :-)
>

I don't want Python to encourage people to use non-ascii module names.
Today, seeing UnicodeEncodingError is one of popular reasons for
newbies to abandon learning Python in Japan. Non-ascii module name is
an another source of confusion for newbies.

Experienced Japanese programmers may not use non-ascii module names to
avoid encoding issues.

But novice programmers or non-programmers willing to learn programming
with Python will wish to use Japanese module names. Their programs
will stop working if they copy them to another environment. Sooner or
later, they will see storange ImportError and will start complaining
"Python sucks! Python doesn't support Japanese!" on Twitter.

Copying files with non-ascii file name over platform is not easy as it
sounds. What happen if I copy such files from OSX to my web hosting
server ? Results might differ depending on tools I use to copy and
platforms.

Is it a good opportunity to start learnig abound encodings? I don't
think so. They should learn concepts of charater set and encodings,
Unicode and JIS character sets, some kind of Japanse encodings, number
of platform specifix issues, non-standard extention of Microsoft and
Apple, and so on. I think they should defer learning these messes
until they get ready.

-- 
Atsuo Ishimoto
Mail: ishim...@gembook.org
Blog: http://d.hatena.ne.jp/atsuoishimoto/
Twitter: atsuoishimoto
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Divorcing str and unicode (no more implicitconversions).

2005-10-28 Thread Atsuo Ishimoto
Hello from Japan,

I googled discussions about non-ASCII identifiers in Japanese, but I
found no consensus. Major languages such as Java or VB support non-ASCII
identifiers, so projects uses non-ASCII identifiers for their programs
are existing. Not all Japanese programmers think this is a good idea.
Some people enthusiastically prefer Japanese identifiers, but some feel
it reduces readability and hard to type, some worry about tool breakages
or encoding problem, etc. It looks that smart people don't like to
express their preference to Japanese identifiers, maybe because they
think such style is not cool, or they are afraid such confession may
reveal lack of their English ability.;) 

I'm +0.1 for non-ASCII identifiers, although module names should remain
ASCII. ASCII identifiers might be encouraged, but as Martin said, it is
very useful for some groups of users.


On Sat, 29 Oct 2005 00:21:03 +0200
"Martin v. Lvwis" <[EMAIL PROTECTED]> wrote:

> Neil Hodgson wrote:
> >This is anecdotal but it appears to me that transliterations are
> > not commonly used apart from learning languages and some minimal help
> > for foreigners such as including transliterated names on railway
> > station name boards.
> 
> That would be my guess also. Transliteration is clearly common for
> Latin-based languages (French, German, Spanish, say), but I doubt
> non-Latin scripts are that often transliterated (even if conventions
> exist).
> 

Yes, transliterations are rarely used in daily life in Japan. For
programming, I know a lot of projects use transliterated Japanses style,
but I guess they are rather minority.

--
Atsuo Ishimoto
[EMAIL PROTECTED]
Homepage:http://www.gembook.jp

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com