Updates:
Status: Started
Comment #3 on issue 1977 by mattpap: symbols() gives unexpected behavior
when passed a list of length 1
http://code.google.com/p/sympy/issues/detail?id=1977
In polys10 I cleaned up var() and symbols() a little bit, disallowing the
old syntax for symbols() and implementing several new features, e.g.:
In [1]: symbols('x')
Out[1]: x
In [2]: symbols('x,')
Out[2]: (x,)
In [3]: symbols('x,y,z')
Out[3]: (x, y, z)
In [4]: symbols('x y z')
Out[4]: (x, y, z)
In [5]: symbols(['x'])
Out[5]: [x]
In [6]: symbols(['x', 'y'])
Out[6]: [x, y]
In [7]: symbols(('x',))
Out[7]: (x,)
In [8]: symbols(('x', 'y'))
Out[8]: (x, y)
In [9]: symbols(set(['x', 'y']))
Out[9]: set(x, y)
In [10]: symbols('x', seq=True)
Out[10]: (x,)
In [11]: symbols('f', cls=Function)
Out[11]: f
In [12]: type(_)
Out[12]: <class 'sympy.core.function.FunctionClass'>
In [13]: symbols('x0:10')
Out[13]: (x₀, x₁, x₂, x₃, x₄, x₅, x₆, x₇, x₈, x₉)
In [14]: symbols('x:10')
Out[14]: (x₀, x₁, x₂, x₃, x₄, x₅, x₆, x₇, x₈, x₉)
In [15]: symbols('x5:10')
Out[15]: (x₅, x₆, x₇, x₈, x₉)
In [16]: symbols('x5:10,y:5')
Out[16]: (x₅, x₆, x₇, x₈, x₉, y₀, y₁, y₂, y₃, y₄)
In [17]: symbols('x5:10,y:5,z')
Out[17]: (x₅, x₆, x₇, x₈, x₉, y₀, y₁, y₂, y₃, y₄, z)
In [18]: symbols(('x5:10', 'y:5', 'z'))
Out[18]: ((x₅, x₆, x₇, x₈, x₉), (y₀, y₁, y₂, y₃, y₄), z)
In [19]: symbols(('x5:10', 'y:5', 'z,'))
Out[19]: ((x₅, x₆, x₇, x₈, x₉), (y₀, y₁, y₂, y₃, y₄), (z,))
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to sympy-iss...@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.