changeset 68:7cbaec8720d6

TileHolder: implement __len__ method I really want to treat this just like a normal list
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Mon, 09 Sep 2019 17:58:09 -0400
parents 682614322b97
children 4e5f2f16cb84
files tilerswift
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tilerswift
+++ b/tilerswift
@@ -136,6 +136,9 @@
         for thing in self.things:
             yield thing
 
+    def __len__(self):
+        return len(self.things)
+
     def resize(self, numrows, numcols):
         self.numrows = numrows
         self.numcols = numcols