Swap order of symbols and Dummy
[linpy.git] / pypol / linexprs.py
index f3cff23..ef5d90b 100644 (file)
@@ -9,7 +9,7 @@ from fractions import Fraction, gcd
 
 __all__ = [
     'Expression',
 
 __all__ = [
     'Expression',
-    'Symbol', 'symbols', 'Dummy',
+    'Symbol', 'Dummy', 'symbols',
     'Rational',
 ]
 
     'Rational',
 ]
 
@@ -415,12 +415,6 @@ class Symbol(Expression):
             raise TypeError('expr must be a sympy.Symbol instance')
 
 
             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__ = (
 class Dummy(Symbol):
 
     __slots__ = (
@@ -449,6 +443,12 @@ class Dummy(Symbol):
         return isinstance(other, Dummy) and self._index == other._index
 
 
         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__ = (
 class Rational(Expression):
 
     __slots__ = (