John Ladasky <john_lada...@sbcglobal.net> writes: > from math import pi as π > [...] > c = 2 * π * r
> Up until today, every character I've tried has been accepted by the > Python interpreter as a legitimate character for inclusion in a > variable name. Now I'm copying a formula which defines a gradient. The > nabla symbol (∇) is used in the naming of gradients. Python isn't > having it. The interpreter throws a "SyntaxError: invalid character in > identifier" when it encounters the ∇. The rules are at https://docs.python.org/3.5/reference/lexical_analysis.html#identifiers To me it makes a lot of sense to *not* include category Sm characters in identifiers, since they are usually used to denote operators (like +). It would be very confusing to have a variable named ∇f, as confusing as naming a variable a+b or √x. -- Alain. -- https://mail.python.org/mailman/listinfo/python-list