Comment #2 on issue 1763 by [email protected]: sympify(u"α") does not
work
http://code.google.com/p/sympy/issues/detail?id=1763
In my "code-refactor-3" branch, I bypass the encoding problem and get the
same error
as in the initial comment:
In [1]: sympify(u"α")
---------------------------------------------------------------------------
SympifyError Traceback (most recent call last)
/media/sda2/Boulot/Projets/sympy-git/<ipython console> in <module>()
/media/sda2/Boulot/Projets/sympy-git/sympy/core/sympify.py in sympify(a,
locals,
convert_xor, strict)
123
124 import ast_parser
--> 125 return ast_parser.parse_expr(a, locals)
126
127 def _sympify(a):
/media/sda2/Boulot/Projets/sympy-git/sympy/core/ast_parser.pyc in
parse_expr(s,
local_dict)
88 a = parse(s.strip(), mode="eval")
89 except SyntaxError:
---> 90 raise SympifyError("Cannot parse.")
91 a = Transform(local_dict, global_dict).visit(a)
92 e = compile(a, "<string>", "eval")
SympifyError: SympifyError: 'Cannot parse.'
The fundamental problem is that ast_parser can only handle valid Python2
identifiers,
which are limited to basic ASCII characters. Solving this seems very
difficult. OTOH,
the good news is that Python3 has solved the problem for us.
I'd suggest we postpone this until either:
* we switch to Python3
* or someone decides to do a complete overhaul of the parser.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" 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-issues?hl=en.