diff --git a/dotfiles/lib/python/parenthesizations.py b/dotfiles/lib/python/parenthesizations.py index af338799..97c29975 100644 --- a/dotfiles/lib/python/parenthesizations.py +++ b/dotfiles/lib/python/parenthesizations.py @@ -3,13 +3,11 @@ from backports.functools_lru_cache import lru_cache def parenthesizations(pairs): parenthesizations = _parenthesizations(pairs * 2, net=0) - return call_count, parenthesizations + return parenthesizations @lru_cache(maxsize=None) def _parenthesizations(length, net=0): - if net > length or net < 0: - raise Exception() if net == length: return [')' * length] res = prepend('(', _parenthesizations(length-1, net=net + 1))