From e396eb5bf416b26033073ddc5bdc00489fbcf6d4 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Mon, 24 Aug 2015 15:27:29 -0700 Subject: [PATCH] Fix parenthesizations.py --- dotfiles/lib/python/parenthesizations.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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))