From 3a727724623f5450c2247fef0911f0d1af2abb92 Mon Sep 17 00:00:00 2001 From: Marege Date: Thu, 29 Oct 2026 21:53:30 +0100 Subject: [PATCH] u7Fix5 --- u7/hash_table.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/u7/hash_table.py b/u7/hash_table.py index ac3fc6b..56c5502 100644 --- a/u7/hash_table.py +++ b/u7/hash_table.py @@ -6,7 +6,7 @@ from unittest import result class HashTable: def __init__(self, capacity=10): """Vytvor prázdnu tabuľku s kladnou celočíselnou kapacitou.""" - if not isinstance(capacity, int): + if not isinstance(capacity, int) or isinstance(capacity, bool): # бо булл по факту теж 1 або 0 raise TypeError("kapacita ma byt cele cislo") if capacity <= 0: raise ValueError("kapacita ma byt + a cela")