It already works in Python 3:
Python 3.1.2 (r312:79147, Mar 23 2010, 22:02:05)
[GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> α = 1
>>> α
1
On the one hand, I agree that it is going to be a pain to have variable names
that can't be typed. On the other hand, it can have some advantages. I was
talking with someone on IRC the other day who tried doing something with a
Symbol named X_{T, R} or something like that, but it was giving him problems
because the symbol name needed to be a valid Python variable name, but he also
needed to work fine in LaTeX. Expanding the scope of valid Python variable
names from [A-Za-z][A-Za-z_]* could make these kinds of problems easier to
solver. Also, it can make parsing easier, see issue 1763.
I do agree that all library code should be limited to ASCII, though. Unicode
should only be used if there is no other easy way to work around something, or
else only by the people who are 120% sure that their code will never be read by
someone who can't easily type those characters, to quote PEP 8.
Aaron Meurer
On Jun 5, 2010, at 4:08 PM, Gael Varoquaux wrote:
> On Sat, Jun 05, 2010 at 06:03:04PM -0400, Alan Bromborsky wrote:
>> Are there any plans in python to allow python variables to be designated
>> in the program by unicode strings as opposed to the current ASCII
>> strings?
>
> Yes, and its going to be a horrible mess: different people are going to
> be able to enter different code that others can't type without doing
> copy-paste. In addition, think of the bugs with glyphs that are almost
> similar...
>
> Gaël
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/sympy?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.