Changed the way bit vectors are parsed and unparsed
The string representation of a bit vector is now space-separated, for
compatibility with the other string representations, and -- to accommodate
this change -- the parser now ignores whitespace
@@ -9,7 +9,7 @@ def int_unparse_entry(entry):
return " ".join(map(str, map(int, entry)))
def bit_parse_entry(line):
- return [bool(int(x)) for x in list(line.strip())]
+ return [bool(int(x)) for x in list(line.replace(" ", "").replace("\t", ""))]
def bit_unparse_entry(entry):
return " ".join(map(lambda el: "1" if el else "0", entry))
