def __init__ (self, *args): self._reset() args_count = listutils.count(args) if args_count == 1: self.version_string = args[0] elif args_count == 3: self.major = args[0] self.minor = args[1] self.revision = args[2]
def _is_inbounds(self, index): return index < listutils.count(self._strings)
def test_count_empty(self): count = listutils.count (None) self.assertEquals(count, 0)
def test_count_non_empty(self): count = listutils.count ([1, 2, 3]) self.assertEquals(count, 3)
def test_count_empty(self): count = listutils.count(None) self.assertEquals(count, 0)
def test_count_non_empty(self): count = listutils.count([1, 2, 3]) self.assertEquals(count, 3)
def count(self): return listutils.count(self._cards)