diff options
Diffstat (limited to 'python/src/lattice.pxi')
-rw-r--r-- | python/src/lattice.pxi | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/src/lattice.pxi b/python/src/lattice.pxi index 08405188..14864549 100644 --- a/python/src/lattice.pxi +++ b/python/src/lattice.pxi @@ -16,6 +16,9 @@ cdef class Lattice: self.lattice = new lattice.Lattice() lattice.ConvertTextToLattice(string(<char *>inp), self.lattice) + def __dealloc__(self): + del self.lattice + def __getitem__(self, int index): if not 0 <= index < len(self): raise IndexError('lattice index out of range') @@ -51,9 +54,6 @@ cdef class Lattice: for i in range(len(self)): yield self[i] - def __dealloc__(self): - del self.lattice - def todot(self): def lines(): yield 'digraph lattice {' |