(self, num_buckets=1024, own_hash=None)
Initializes a dictionary with the given number of buckets.
Initializes a dictionary with the given number of buckets.
Initializes a dictionary with the given number of buckets .
def __init__(self, num_buckets=1024, own_hash=None):
        """
        Initializes a dictionary with the given number of buckets.
        """
        self.dict = []
        for i in range(num_buckets):
            self.dict.append((None, None))
        self.keys = dict()
        self.hash = hash
        if own_hash is not None:
            own_hash.modulo = len(self.dict)
            self.hash = own_hash.get_hash
        self.num_collisions = 0
        self.num_calls = 0
def __init__ ( self , num_buckets = 1024 , own_hash = None ) : self . dict = [ ] for i in range ( num_buckets ) : self . dict . append ( ( None , None ) ) self . keys = dict ( ) self . hash = hash if own_hash is not None : own_hash . modulo = len ( self . dict ) self . hash = own_hash . get_hash self . num_collisions = 0 self . num_calls = 0