예제 #1
0
    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]
예제 #2
0
    def _is_inbounds(self, index):

        return index < listutils.count(self._strings)
예제 #3
0
 def test_count_empty(self):
     
     count = listutils.count (None)
     self.assertEquals(count, 0)
예제 #4
0
 def test_count_non_empty(self):
     
     count = listutils.count ([1, 2, 3])
     self.assertEquals(count, 3)
예제 #5
0
    def test_count_empty(self):

        count = listutils.count(None)
        self.assertEquals(count, 0)
예제 #6
0
    def test_count_non_empty(self):

        count = listutils.count([1, 2, 3])
        self.assertEquals(count, 3)
예제 #7
0
 def count(self):
     return listutils.count(self._cards)
예제 #8
0
 def _is_inbounds(self, index):
     
     return index < listutils.count(self._strings)