Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Variable names are not arbitrary. They have meaning. Single-letter lower-case variables hardly cover all possible names.

Mathematica, just like, real mathematics, allows you to have variable names with subscripts/superscripts/greek-letters etc. E.g. a_g is distinct from a_f (which are both rendered in rich text)

My recommendation is not that everyone buy Mathematica, but that sympy figures out a way to allow every sequence of letters and numbers (that start with a letter) to automatically become a variable without declaration.



Subscripts on symbols you can do in sympy as well. Also multiple subscripts.

In your formulas you can have Greek letters in sympy. But you'll have to give the symbols valid python names.


It's possible to get the same result in sympy with some metaprogramming, and it does absolutely support longer names for variables!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: