utils/split-pieces (QfConvert): Construct an instance of the right class.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 21 May 2018 16:35:55 +0000 (17:35 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 11 Jun 2018 15:37:16 +0000 (16:37 +0100)
Of course, `QfConvert' is always the right class at the moment, but it's
the principle of the thing.

utils/split-pieces

index 1c79315..a98cca5 100755 (executable)
@@ -45,7 +45,7 @@ class QfConvert (object):
     else:
       seq = map(int, arg.split(','))
     print ";; piece widths = %r" % seq
-    return QfConvert(p, seq)
+    return cls(p, seq)
   def hack(me, n):
     if 2*n >= me.p: n -= p
     nn = []