When trying to sort an empty iterable, the engine throws a ValueError:
File "C:\Users\camac\AppData\Local\Programs\Python\Python36\lib\site-packages\battlehack20\engine\container\runner.py", line 218, in do_turn
exec(self.locals['turn'].__code__, self.globals, self.locals)
File "bot.py", line 2, in turn
File "C:\Users\camac\AppData\Local\Programs\Python\Python36\lib\site-packages\battlehack20\engine\container\instrument.py", line 14, in instrumented_sorted
cost = len(iterable) * int(math.log(len(iterable)))
ValueError: math domain error
Minimal reproducible code:
When trying to sort an empty iterable, the engine throws a
ValueError
: