X-Git-Url: https://svn.cri.ensmp.fr/git/linpy.git/blobdiff_plain/161d0ced692386a866e55aea673d991e2e95f753..53cfc921440668ddabd7d8192fada69348486a7f:/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__ = (