Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Visually confusable unicode characters in identifiers
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 26 - 39 of 39 - Collapse all  -  Translate all to Translated (View all originals) < Older 
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Matthew Woodcraft  
View profile  
 More options Oct 1 2012, 6:29 pm
From: Matthew Woodcraft <matt...@woodcraft.me.uk>
Date: Mon, 01 Oct 2012 23:28:09 +0100
Local: Mon, Oct 1 2012 6:28 pm
Subject: Re: [Python-ideas] Visually confusable unicode characters in identifiers
On 2012-10-01 21:51, Guido van Rossum wrote:

> Those examples would be a lot more compelling if there was an
> acceptable way to input those characters. Maybe we could support some
> kind of input method that enabled LaTeX style math notation as used by
> scientists for writing equations in papers?

I think that's up to the OS or the text editor.

In Emacs, this works:
M-x set-input-method tex

-M-

_______________________________________________
Python-ideas mailing list
Python-id...@python.org
http://mail.python.org/mailman/listinfo/python-ideas


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Greg Ewing  
View profile  
 More options Oct 1 2012, 7:25 pm
From: Greg Ewing <greg.ew...@canterbury.ac.nz>
Date: Tue, 02 Oct 2012 12:24:27 +1300
Local: Mon, Oct 1 2012 7:24 pm
Subject: Re: [Python-ideas] Visually confusable unicode characters in identifiers

Antoine Pitrou wrote:
> Oh but why isn't it named Python für Kinder? :-)

It looks like Germans have adopted "kid" as an abbreviation
for "kinder", just like we use it as an abbreviation for
"child". Or maybe we got it from them -- it's closer to
their original word than ours!

They seem to be using our plural, though -- "kids", not
"kidden"...

--
Greg
_______________________________________________
Python-ideas mailing list
Python-id...@python.org
http://mail.python.org/mailman/listinfo/python-ideas


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mathias Panzenböck  
View profile  
 More options Oct 1 2012, 8:07 pm
From: Mathias Panzenböck <grosser.meister.mo...@gmx.net>
Date: Tue, 02 Oct 2012 02:06:35 +0200
Local: Mon, Oct 1 2012 8:06 pm
Subject: Re: [Python-ideas] Visually confusable unicode characters in identifiers
On 10/02/2012 01:24 AM, Greg Ewing wrote:

> Antoine Pitrou wrote:

>> Oh but why isn't it named Python für Kinder? :-)

> It looks like Germans have adopted "kid" as an abbreviation
> for "kinder", just like we use it as an abbreviation for
> "child". Or maybe we got it from them -- it's closer to
> their original word than ours!

> They seem to be using our plural, though -- "kids", not
> "kidden"...

Sometimes we use the ...s for plural as well, especially for acronyms, words of English or French
origin and last names. But it would not be ...en, maybe ...er. Is there any German word that uses
...en for plural? I don't think so. Anyway, "kids" is definitely an anglicism, because we pronounce
it "English" and not like it would be pronounced if it where derived from "Kind" (it would be more
like "keed"). German today is full of anglicisms.

But then, there are some German words used by English people as well: gesundheit, kindergarten,
über, blitz(krieg), angst (used as something different as the German word), abseiling ("abseilen" in
German), doppelgänger, gestalt, poltergeist, Zeitgeist...
_______________________________________________
Python-ideas mailing list
Python-id...@python.org
http://mail.python.org/mailman/listinfo/python-ideas


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Steven D'Aprano  
View profile  
 More options Oct 1 2012, 9:32 pm
From: Steven D'Aprano <st...@pearwood.info>
Date: Tue, 02 Oct 2012 11:32:06 +1000
Local: Mon, Oct 1 2012 9:32 pm
Subject: Re: [Python-ideas] Visually confusable unicode characters in identifiers
On 02/10/12 05:29, Massimo DiPierro wrote:

> it does make sense. The only point I tried to make is that,
> because something is allowed, it does mean it should be
> encouraged. I am sure there are instructors who want to teach
>to code using Japanese of Chinese variable names. Python gives
> them a way to do so. Yet, if they do so, they would be
>isolating their students and their code from the rest of the
>world.

People very often over-estimate the cost of that isolation, and
over-value access to the rest of the world.

The average open source piece of software has one, maybe two,
contributors. What do they care if millions of English-speaking
programmers can't contribute when they weren't going to contribute
regardless of the language? Perhaps the convenience of being able
to read your own code in your own native language outweighs the
loss of being able to attract contributors that you can't even
talk to.

And for proprietary software, again it is irrelevant. If a Chinese
company writes Chinese software for Chinese users with Chinese
developers, why would they want to write it in English? Perhaps
they have little choice due to the overwhelming trend towards English
in programming languages, but there's no positive benefit to using
a non-native language.

Quite frankly, and I'm saying this as somebody who only speaks
English, I think that the use of English as the single lingua franca
of computer programming is as unnecessary (and ultimately as harmful)
as the use of Latin and then French as the sole lingua franca of
science and mathematics. I expect that it too will be a passing phase.

By the way, are you familiar with ChinesePython and IronPerunis?

http://www.chinesepython.org/english/english.html
http://ironperunis.codeplex.com/

--
Steven
_______________________________________________
Python-ideas mailing list
Python-id...@python.org
http://mail.python.org/mailman/listinfo/python-ideas


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephen J. Turnbull  
View profile  
 More options Oct 1 2012, 11:49 pm
From: "Stephen J. Turnbull" <step...@xemacs.org>
Date: Tue, 02 Oct 2012 12:48:07 +0900
Local: Mon, Oct 1 2012 11:48 pm
Subject: Re: [Python-ideas] Visually confusable unicode characters in identifiers

Mathias Panzenböck writes:

 > I still don't understand why unicode characters are allowed at all
 > in identifier names.

"Consenting adults."  'nuff said?

An anecdote.  Back when I was first learning Japanese, I maintained an
Emacs interface to EDICT, a free Japanese-English dictionary.  The
code was smart enough to parse morphosyntax (inflection of verbs and
adjectives) into dictionary forms, but I wasn't (and according to my
daughter, still am not<wink/>).  So I asked my tutor for help.

Although a total non-programmer, he was able to read the grammar
easily because the state names (identifiers for callable objects) were
written in Japanese, using the standard grammatical name for the
inflection.  The "easy" part comes in because although his English was
good, it wasn't good enough to disentangle Lisp gobbledygook from the
morphosyntax data had it been written in ASCII.  But he was able to
read and comment on the whole grammar in about half an hour because he
could just skip *all* the ASCII!

_______________________________________________
Python-ideas mailing list
Python-id...@python.org
http://mail.python.org/mailman/listinfo/python-ideas


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephen J. Turnbull  
View profile  
 More options Oct 2 2012, 12:12 am
From: "Stephen J. Turnbull" <step...@xemacs.org>
Date: Tue, 02 Oct 2012 13:11:58 +0900
Local: Tues, Oct 2 2012 12:11 am
Subject: Re: [Python-ideas] Visually confusable unicode characters in identifiers

Guido van Rossum writes:

 > Those examples would be a lot more compelling if there was an
 > acceptable way to input those characters.

Hey!!  What's "unacceptable" about Emacs??<duck/>

 > Maybe we could support some kind of input method that enabled LaTeX
 > style math notation as used by scientists for writing equations in
 > papers?

If you're talking about interactive use, Emacs has a method based on
searching the Unicode character database.

LaTeX math notation has a number of potential pitfalls.  In
particular, the sub-/superscript notation can be applied to anything,
not just characters that happen to have *script versions in Unicode.
Also, not everything that seems to a character in LaTeX necessarily
has a corresponding Unicode character.
_______________________________________________
Python-ideas mailing list
Python-id...@python.org
http://mail.python.org/mailman/listinfo/python-ideas


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben Finney  
View profile  
 More options Oct 2 2012, 12:27 am
From: Ben Finney <ben+pyt...@benfinney.id.au>
Date: Tue, 02 Oct 2012 14:25:40 +1000
Local: Tues, Oct 2 2012 12:25 am
Subject: Re: [Python-ideas] Visually confusable unicode characters in identifiers
Matthew Woodcraft <matt...@woodcraft.me.uk>
writes:

> On 2012-10-01 21:51, Guido van Rossum wrote:
> > Those examples would be a lot more compelling if there was an
> > acceptable way to input those characters. Maybe we could support
> > some kind of input method that enabled LaTeX style math notation as
> > used by scientists for writing equations in papers?

> I think that's up to the OS or the text editor.

Agreed. Make of these identifiers will need to be typed at an OS command
line, after all (e.g. for naming a test case to run, as one which
springs easily to mind).

Solve the keyboard input problem in the OS layer – as someone who
anticipates working with non-ASCII characters must already do – and you
solve it for Python code as well. I don't think it's Python's business
to get involved at the input method level.

--
 \       “The apparent lesson of the Inquisition is that insistence on |
  `\         uniformity of belief is fatal to intellectual, moral, and |
_o__)    spiritual health.” —_The Uses Of The Past_, Herbert J. Muller |
Ben Finney

_______________________________________________
Python-ideas mailing list
Python-id...@python.org
http://mail.python.org/mailman/listinfo/python-ideas


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Greg Ewing  
View profile  
 More options Oct 2 2012, 1:10 am
From: Greg Ewing <greg.ew...@canterbury.ac.nz>
Date: Tue, 02 Oct 2012 18:09:14 +1300
Local: Tues, Oct 2 2012 1:09 am
Subject: Re: [Python-ideas] Visually confusable unicode characters in identifiers

Mathias Panzenböck wrote:
> But it would not be
> ...en, maybe ...er. Is there any German word that uses ...en for plural?
> I don't think so.

This page seems to think that some do:

http://german.about.com/od/grammar/a/PluralNounsWithnENEndings.htm

--
Greg
_______________________________________________
Python-ideas mailing list
Python-id...@python.org
http://mail.python.org/mailman/listinfo/python-ideas


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephen J. Turnbull  
View profile  
 More options Oct 2 2012, 4:05 am
From: "Stephen J. Turnbull" <step...@xemacs.org>
Date: Tue, 02 Oct 2012 17:04:55 +0900
Local: Tues, Oct 2 2012 4:04 am
Subject: Re: [Python-ideas] Visually confusable unicode characters in identifiers

Ben Finney writes:

 > Solve the keyboard input problem in the OS layer – as someone who
 > anticipates working with non-ASCII characters must already do – and you
 > solve it for Python code as well.

That simply isn't true for symbol characters and Greek letters.  I
still let either TeX or XEmacs translate TeX macros for me.  I don't
even know how to type an integral sign in Mac OS X Terminal
(conveniently, that is -- of course there's always the character
palette), and if I wanted directed quotation marks (I don't), I'd just
use ASCII quotes and let XEmacs translate those, too.

There ought to be a standard way to get those symbols and punctuation,
preferably ASCII-based, on any terminal, using the standard Python
interpreter.

_______________________________________________
Python-ideas mailing list
Python-id...@python.org
http://mail.python.org/mailman/listinfo/python-ideas


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Serhiy Storchaka  
View profile  
 More options Oct 2 2012, 6:44 am
From: Serhiy Storchaka <storch...@gmail.com>
Date: Tue, 02 Oct 2012 13:43:07 +0300
Local: Tues, Oct 2 2012 6:43 am
Subject: Re: [Python-ideas] Visually confusable unicode characters in identifiers
On 01.10.12 23:51, Guido van Rossum wrote:

> Those examples would be a lot more compelling if there was an
> acceptable way to input those characters. Maybe we could support some
> kind of input method that enabled LaTeX style math notation as used by
> scientists for writing equations in papers?

\u03B1

Java already allows this outside of the string literals. And it
sometimes causes unpleasant effects.

_______________________________________________
Python-ideas mailing list
Python-id...@python.org
http://mail.python.org/mailman/listinfo/python-ideas


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben Finney  
View profile  
 More options Oct 2 2012, 7:40 am
From: Ben Finney <ben+pyt...@benfinney.id.au>
Date: Tue, 02 Oct 2012 21:39:12 +1000
Local: Tues, Oct 2 2012 7:39 am
Subject: Re: [Python-ideas] Visually confusable unicode characters in identifiers
"Stephen J. Turnbull" <step...@xemacs.org>
writes:

> I still let either TeX or XEmacs translate TeX macros for me. I don't
> even know how to type an integral sign in Mac OS X Terminal
> (conveniently, that is -- of course there's always the character
> palette), and if I wanted directed quotation marks (I don't), I'd just
> use ASCII quotes and let XEmacs translate those, too.

Right. So you've solved it for one program only, not the OS which is (or
should be) responsible for turning what you type into characters,
uniformly across all applications you have keyboard input for.

> There ought to be a standard way to get those symbols and punctuation,
> preferably ASCII-based, on any terminal

Definitely agreed with this. Indeed, it's my point: the problem should
be solved in one place for the user of the computer, not separately per
application or framework.

> using the standard Python interpreter.

If you mean that the Python interpreter should be aware of the solution,
why? That's solving it at the wrong level, because any non-Python
program (such as a shell or an editor) gets no benefit from that.

If you mean that the single, one-point solution should work across all
programs, including the standard Python interpreter, then yes I agree.

I'm saying the OS is the right place to solve it, by installing an
appropriate input method (or whatever each OS calls them).

--
 \         “In economics, hope and faith coexist with great scientific |
  `\      pretension and also a deep desire for respectability.” —John |
_o__)                                    Kenneth Galbraith, 1970-06-07 |
Ben Finney

_______________________________________________
Python-ideas mailing list
Python-id...@python.org
http://mail.python.org/mailman/listinfo/python-ideas


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephen J. Turnbull  
View profile  
 More options Oct 3 2012, 1:32 am
From: "Stephen J. Turnbull" <step...@xemacs.org>
Date: Wed, 03 Oct 2012 14:31:46 +0900
Local: Wed, Oct 3 2012 1:31 am
Subject: Re: [Python-ideas] Visually confusable unicode characters in identifiers

Ben Finney writes:

 > "Stephen J. Turnbull" <step...@xemacs.org>
 > writes:

 >
 > > I still let either TeX or XEmacs translate TeX macros for me. I don't
 > > even know how to type an integral sign in Mac OS X Terminal
 > > (conveniently, that is -- of course there's always the character
 > > palette), and if I wanted directed quotation marks (I don't), I'd just
 > > use ASCII quotes and let XEmacs translate those, too.
 >
 > Right. So you've solved it for one program only, not the OS

You seem to be under a misconception.  Emacs *is* an OS, it just runs
on top of the more primitive OSes normally associated with the term. ;-)

 > I'm saying the OS is the right place to solve it, by installing an
 > appropriate input method (or whatever each OS calls them).

I doubt very many people used to and fond of LaTeX would agree with
you, since AFAIK there aren't any OSes providing TeX macros as an
input method.  AFAICS it's not available on my Mac.

While I don't particularly favor it, it may be the best compromise, as
many people are familiar with it, and many many symbols are available
with familiar, intuitive names so that non-TeXnical typists can often
guess them.
_______________________________________________
Python-ideas mailing list
Python-id...@python.org
http://mail.python.org/mailman/listinfo/python-ideas


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben Finney  
View profile  
 More options Oct 3 2012, 6:20 pm
From: Ben Finney <ben+pyt...@benfinney.id.au>
Date: Thu, 04 Oct 2012 08:20:34 +1000
Local: Wed, Oct 3 2012 6:20 pm
Subject: Re: [Python-ideas] Visually confusable unicode characters in identifiers
"Stephen J. Turnbull" <step...@xemacs.org>
writes:

> Ben Finney writes:
>  > Right. So you've solved it for one program only, not the OS

> You seem to be under a misconception.  Emacs *is* an OS […]

… all it needs is a good editor? :-)

(I'm claiming permission for that snark because Emacs is my primary
editor.)

>  > I'm saying the OS is the right place to solve it, by installing an
>  > appropriate input method (or whatever each OS calls them).

> I doubt very many people used to and fond of LaTeX would agree with
> you, since AFAIK there aren't any OSes providing TeX macros as an
> input method.

I've shown several LaTeX-comfortable people IBus on GNOME and/or KDE
(for GNU+Linux), and they were very glad that it has a LaTeX input
method. So anyone who is fond of LaTeX and has IBus or an equivalent
input method engine on their OS can agree.

> AFAICS it's not available on my Mac.

That's a shame. Maybe some OS vendors don't want to support users
extending the OS functionality? Or maybe your OS does have such a thing
available. I haven't been motivated to look for it.

> While I don't particularly favor it, it may be the best compromise, as
> many people are familiar with it, and many many symbols are available
> with familiar, intuitive names so that non-TeXnical typists can often
> guess them.

Agreed. Which is why I advocate installing such an input method in one's
OS input method engine, so that input method is available for all
applications.

--
 \     “I thought I'd begin by reading a poem by Shakespeare, but then |
  `\     I thought ‘Why should I? He never reads any of mine.’” —Spike |
_o__)                                                         Milligan |
Ben Finney

_______________________________________________
Python-ideas mailing list
Python-id...@python.org
http://mail.python.org/mailman/listinfo/python-ideas


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephen J. Turnbull  
View profile  
 More options Oct 4 2012, 11:12 pm
From: "Stephen J. Turnbull" <step...@xemacs.org>
Date: Fri, 05 Oct 2012 12:11:34 +0900
Local: Thurs, Oct 4 2012 11:11 pm
Subject: Re: [Python-ideas] Visually confusable unicode characters in identifiers

Ben Finney writes:

 > I've shown several LaTeX-comfortable people IBus on GNOME and/or KDE
 > (for GNU+Linux), and they were very glad that it has a LaTeX input
 > method.

I'm happy to be proved wrong!

 > > AFAICS it's not available on my Mac.
 >
 > That's a shame. Maybe some OS vendors don't want to support users
 > extending the OS functionality? Or maybe your OS does have such a thing
 > available. I haven't been motivated to look for it.

I have looked for it; if it's available on Mac OS X, it's not easy to
find.  I suspect the same is true for Windows.

 > Agreed. Which is why I advocate installing such an input method in one's
 > OS input method engine, so that input method is available for all
 > applications.

Whatever makes you think I don't?  That's *exactly* why I live in
XEmacs, because it provides me with a portable environment for mixing
English and math with a language whose orthography puts Brainf*ck
syntax to shame.

But pragmatically speaking, Unicode support is a sore point for
Python.  "Screw you if you don't know how to conveniently input
integral signs on your OS" is not a message we want to be sending.
_______________________________________________
Python-ideas mailing list
Python-id...@python.org
http://mail.python.org/mailman/listinfo/python-ideas


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages < Older 
« Back to Discussions « Newer topic     Older topic »