X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;ds=sidebyside;f=koperkapel%2Fworld.py;fp=koperkapel%2Fworld.py;h=6a81f4c8a958fff21d419a1ee762c653e14828df;hb=962a6b665a80a7fbbdd2d972e011af625cb016dd;hp=b0e3debfd16d830ee8d030aee2aa2eb4e5be8a3a;hpb=53c90678b40bf45114205afd5ac8e96430420d14;p=koperkapel.git diff --git a/koperkapel/world.py b/koperkapel/world.py index b0e3deb..6a81f4c 100644 --- a/koperkapel/world.py +++ b/koperkapel/world.py @@ -128,3 +128,9 @@ class WorldListProxy(WorldBaseProxy): def __getitem__(self, index): return _maybe_subproxy(self, index, self._state[index]) + + def __len__(self): + return len(self._state) + + def __bool__(self): + return bool(self._state)