Status: Valid
Owner: ----
Labels: Type-Defect Priority-Medium EasyToFix
New issue 3576 by asmeu...@gmail.com: symbols('aa:g') should work
http://code.google.com/p/sympy/issues/detail?id=3576
We have
In [3]: symbols('a0:3')
Out[3]: (a₀, a₁, a₂)
So I would expect symbols('aa:c') to produce symbols aa, ab, and ac. But
we have instead:
In [1]: symbols('aa:g')
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-1-edaf0402c3f2> in <module>()
----> 1 symbols('aa:g')
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/symbol.pyc in
symbols(names, **args)
401
402 raise ValueError(
--> 403 "'%s' is not a valid symbol range specification" %
name)
404
405 if not seq and len(result) <= 1:
ValueError: 'aa:g' is not a valid symbol range specification
Also, while we're at it, let ranges be enclosed by parentheses, so that we
can do symbols("a1(2:4)") -> a12, a13 and symbols("a(0:2)(0:2)") -> a00,
a01, a10, a11. For letters, they would be unnecessary (i.e.,
symbols("aa:zz") would be the same as symbols('a(a:z)z')), because the end
points can only be one character long.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to sympy-issues@googlegroups.com.
To unsubscribe from this group, send email to
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.