This pull request implements new behavior of symbols function, e.g.:
In [1]: symbols('aa:d')
Out[1]: (aa, ab, ac, ad)
A simple test is also provided.
The original issue: http://code.google.com/p/sympy/issues/detail?id=3576 also suggests some other features that might be worth implementing. I think that deserves new pull requests.
git pull https://github.com/mrshu/sympy symbols
Or view, comment on, or merge it at:
https://github.com/sympy/sympy/pull/1706
—
Reply to this email directly or view it on GitHub.
SymPy Bot Summary:
Failed after merging mrshu/symbols (0c60e01) into master (c3e9d56).
@mrshu: Please fix the test failures.
Python 2.5.0-final-0: fail
Python 2.6.6-final-0: fail
Python 2.7.2-final-0: fail
Python 2.6.8-final-0: pass
Python 2.7.3-final-0: pass
PyPy 2.0.0-beta-1; 2.7.3-final-42: pass
Python 3.2.2-final-0: pass
Python 3.3.0-final-0: pass
Python 3.2.3-final-0: pass
Python 3.3.0-final-0: pass
Python 3.3.0-final-0: pass
**Sphinx 1.1.3:** pass
I'm not sure if this is normal situation here but I believe those tests doesn't fail because of my commit.
No, that's just Pyglet acting up again.
Well, you went with a pretty specific instance of something that I think should be much more general. See the issue for what I am talking about. For example, neither a1a:g nor aa:gg work. Ideally, there would be just one regular expression to match all cases (or two, one for uppercase and one for lowercase). It's not that complicated: letter1:letter2 should be matched, where letter1 and letter2 are a single alphabetic letters of the same case.
By the way, symbols("A:g") works and gives something strange. This is why there should be separate cases for uppercase and lowercase.
Thanks for comments!
Both a1a:g and aa:gg should now work. I am not sure if I got the point with aa:gg but it should now generate (aag, abg, acg, adg, aeg, afg, agg).
Also, if the first argument is uppercase and the second lowercase an empty tuple is returned.
This looks much better.
SymPy Bot Summary:
Passed after merging mrshu/symbols (f910c1f) into master (c3e9d56).
Python 2.5.0-final-0: pass
Python 2.6.6-final-0: pass
Python 2.7.2-final-0: pass
Python 2.6.8-final-0: pass
Python 2.7.3-final-0: pass
PyPy 2.0.0-beta-1; 2.7.3-final-42: pass
Python 3.2.2-final-0: pass
Python 3.3.0-final-0: pass
Python 3.2.3-final-0: pass
Python 3.3.0-final-0: pass
Python 3.3.0-final-0: pass
Sphinx 1.1.3: pass
Merging...
Merged #1706.