2 ms·
> We can solve the how-do-we-want-the-hash-table-to-behave problem perfectly by returning an invalid index when the substring isn't present, and... that's what
by masklinn 7y ago
> We can solve the how-do-we-want-the-hash-table-to-behave problem perfectly by returning an invalid index when the substring isn't present, and... that's what we do.
Negative indices are valid in python. Also str.index raises.
And product types are not a good way to signal exclusive conditions.