Skip to content
Browse files

allow frozenbitarray object to be used in codedict

  • Loading branch information...
1 parent 036eb29 commit 530f770ff284b8308ea49bc29dfa6d29c6946d5f Ilan Schnell committed Apr 9, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 bitarray/
2 bitarray/
@@ -40,7 +40,7 @@ def _check_codedict(codedict):
if len(codedict) == 0:
raise ValueError("prefix code empty")
for k, v in codedict.items():
- if not isinstance(v, bitarray):
+ if not isinstance(v, (bitarray, frozenbitarray)):
raise TypeError("bitarray expected for dictionary value")
if v.length() == 0:
raise ValueError("non-empty bitarray expected")

0 comments on commit 530f770

Please sign in to comment.
Something went wrong with that request. Please try again.