u7fix3
This commit is contained in:
parent
a7800a5027
commit
b3261e0380
@ -6,6 +6,8 @@ from unittest import result
|
|||||||
class HashTable:
|
class HashTable:
|
||||||
def __init__(self, capacity=10):
|
def __init__(self, capacity=10):
|
||||||
"""Vytvor prázdnu tabuľku s kladnou celočíselnou kapacitou."""
|
"""Vytvor prázdnu tabuľku s kladnou celočíselnou kapacitou."""
|
||||||
|
if not isinstance(capacity, int) or capacity <= 0:
|
||||||
|
raise ValueError("kapacita ma byt + a cela")
|
||||||
self.empty = object()
|
self.empty = object()
|
||||||
self.deleted = object()
|
self.deleted = object()
|
||||||
self._capacity = capacity
|
self._capacity = capacity
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user