diff options
| author | Kenneth Reitz <me@kennethreitz.com> | 2011-07-04 05:48:37 -0400 |
|---|---|---|
| committer | Kenneth Reitz <me@kennethreitz.com> | 2011-07-04 05:48:37 -0400 |
| commit | fefc7b4d1fc4799ae174dfc65b0ee3ce4d26d663 (patch) | |
| tree | eea9f275ec116dd4ad191f95473963aa9a5d20d1 /tablib | |
| parent | 23a5bb14432eda6aa38f47c1bb7e4f6a4b4aa21a (diff) | |
| parent | 6313437a27d68e42247802f7f68ec3270cb9a2da (diff) | |
| download | tablib-fefc7b4d1fc4799ae174dfc65b0ee3ce4d26d663.tar.gz | |
Merge branch 'unicodeheaders' of https://github.com/mwalling/tablib into develop
Diffstat (limited to 'tablib')
| -rw-r--r-- | tablib/core.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tablib/core.py b/tablib/core.py index 1025b61..7e78b56 100644 --- a/tablib/core.py +++ b/tablib/core.py @@ -162,7 +162,7 @@ class Dataset(object): def __getitem__(self, key): - if isinstance(key, str): + if isinstance(key, str) or isinstance(key, unicode): if key in self.headers: pos = self.headers.index(key) # get 'key' index from each data return [row[pos] for row in self._data] @@ -182,7 +182,7 @@ class Dataset(object): def __delitem__(self, key): - if isinstance(key, str): + if isinstance(key, str) or isinstance(key, unicode): if key in self.headers: @@ -741,7 +741,7 @@ class Dataset(object): sorted. """ - if isinstance(col, str): + if isinstance(col, str) or isinstance(col, unicode): if not self.headers: raise HeadersNeeded |
