[Python-ideas] Visually confusable unicode characters in identifiers
Oscar Benjamin
oscar.j.benjamin at gmail.com
Mon Oct 1 23:46:50 CEST 2012
On 1 October 2012 21:51, Guido van Rossum <guido at python.org> wrote:
> On Mon, Oct 1, 2012 at 1:26 PM, Oscar Benjamin
> <oscar.j.benjamin at gmail.com> wrote:
>> # Parameters
>> α = 1
>> β = 0.1
>> γ = 1.5
>> δ = 0.075
>>
>> # Initial conditions
>> xₒ = 10
>> yₒ = 5
>> Zₒ = xₒ, yₒ
>
> 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?
Sympy already has a few of the basic TeX concepts. I imagine that something
like Sympy notebooks (a browser-based interface) might one day gain support
for this. A readline-ish method to do it would be a great extension to
isympy (since it already works for output):
$ isympy
IPython console for SymPy 0.7.1.rc1 (Python 2.7.3-64-bit) (ground types:
python)
In [1]: Symbol('beta')
Out[1]: β
In [2]: Symbol('c_1')
Out[2]: c₁
Oscar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20121001/cbf34cd4/attachment.html>
More information about the Python-ideas
mailing list