Commit de0aaba 1 parent 98a04a8 commit de0aaba Copy full SHA for de0aaba
File tree 1 file changed +2
-4
lines changed
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -30,18 +30,16 @@ def __next__(self):
30
30
31
31
@staticmethod
32
32
def guess_the_label_size (path_size : int , combination_size : int ) -> int :
33
- # The theoritical limit for this at the time of writing is 2_538_557_185_841_324_496 (python 3.12.2)
34
33
calculated_path_size = - 1 # -1 is here for 0th index items
35
34
# The theoritical limit for this at the time of writing is 32 (python 3.12.2)
36
35
label_size = 0
37
36
38
- # THIS IS AN VERY IMPORTANT CHECK
39
37
last = 0
40
38
41
39
while True :
42
- possible_cominations = math .comb (combination_size , label_size )
40
+ possible_cominations = math .perm (combination_size , label_size )
43
41
if last > possible_cominations :
44
- raise ValueError ("We approached the limit of `math.comb` " )
42
+ raise ValueError ("There is error in the input value " )
45
43
46
44
last = possible_cominations
47
45
calculated_path_size += possible_cominations
You can’t perform that action at this time.
0 commit comments