From 3f706cd240d039365cbb8f9975ad97480d8b6145 Mon Sep 17 00:00:00 2001 From: Jonathan Herman Date: Sat, 27 Apr 2013 15:34:13 -0400 Subject: Fixes. --- parse/col_map.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'parse/col_map.py') diff --git a/parse/col_map.py b/parse/col_map.py index 15e1d64..ceb8867 100644 --- a/parse/col_map.py +++ b/parse/col_map.py @@ -11,12 +11,15 @@ class ColMapBuilder(object): return ColMap(col_list, self.value_map) def try_add(self, column, value): - self.value_map[column].add( value ) + self.value_map[column].add( str(value) ) def try_remove(self, column): if column in self.value_map: del(self.value_map[column]) + def __contains__(self, col): + return col in self.value_map + class ColMap(object): def __init__(self, col_list, values = None): self.col_list = col_list -- cgit v1.2.2