X-Git-Url: https://svn.cri.ensmp.fr/git/linpy.git/blobdiff_plain/fb070deb31a82b789e1be4ffc5dfa64b4b7a9e36..de11b4e658edf3ea876aaea3d3d681eaec13dcc4:/pypol/linexprs.py diff --git a/pypol/linexprs.py b/pypol/linexprs.py index f3cff23..ef5d90b 100644 --- a/pypol/linexprs.py +++ b/pypol/linexprs.py @@ -9,7 +9,7 @@ from fractions import Fraction, gcd __all__ = [ 'Expression', - 'Symbol', 'symbols', 'Dummy', + 'Symbol', 'Dummy', 'symbols', 'Rational', ] @@ -415,12 +415,6 @@ class Symbol(Expression): raise TypeError('expr must be a sympy.Symbol instance') -def symbols(names): - if isinstance(names, str): - names = names.replace(',', ' ').split() - return tuple(Symbol(name) for name in names) - - class Dummy(Symbol): __slots__ = ( @@ -449,6 +443,12 @@ class Dummy(Symbol): return isinstance(other, Dummy) and self._index == other._index +def symbols(names): + if isinstance(names, str): + names = names.replace(',', ' ').split() + return tuple(Symbol(name) for name in names) + + class Rational(Expression): __slots__ = (