sympy/sympy — pull request #1808 by smichr (2013-02-20 09:53:11+00:00)
Title: Symbols

This is a continuation of https://github.com/sympy/sympy/pull/1738 which allows escaping of space, colon and commas while implementing the parentheses option around ranges. It uses regex to identify the ranges in the input string.

It also

* allows parentheses to be included in the output string around ranges

```
>>> symbols("x((:2))")
(x(0), x(1))
```

* catches the implicit starts which are currently missed, e.g.

```
>>> symbols(':c') # now gives (a, b, c)
Traceback (most recent call last):
File "", line 1, in
File "sympy\core\symbol.py", line 430, in symbols
"'%s' is not a valid symbol range specification" % name)
ValueError: ':c' is not a valid symbol range specification
```

and the following now work

```
>>> symbols('x:3:2')
(x00, x01, x10, x11, x20, x21)
>>> symbols('1:c')
(1a, 1b, 1c)
```