diff options
| author | Kenneth Reitz <me@kennethreitz.com> | 2011-06-30 16:28:56 -0400 |
|---|---|---|
| committer | Kenneth Reitz <me@kennethreitz.com> | 2011-06-30 16:28:56 -0400 |
| commit | d254c2d2b02b026d08cef01475d16fcc51e763ec (patch) | |
| tree | ccbd6b34f63adff51b816ac779659971a2ead14d /tablib/core.py | |
| parent | 9b235150cf58721596a2ca650e26237b1fd59aba (diff) | |
| download | tablib-d254c2d2b02b026d08cef01475d16fcc51e763ec.tar.gz | |
dynamic columns bugfix for @mwalling :)
Diffstat (limited to 'tablib/core.py')
| -rw-r--r-- | tablib/core.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tablib/core.py b/tablib/core.py index 252c1ab..53f3767 100644 --- a/tablib/core.py +++ b/tablib/core.py @@ -18,8 +18,8 @@ from tablib.compat import OrderedDict __title__ = 'tablib' -__version__ = '0.9.10' -__build__ = 0x000910 +__version__ = '0.9.11' +__build__ = 0x000911 __author__ = 'Kenneth Reitz' __license__ = 'MIT' __copyright__ = 'Copyright 2011 Kenneth Reitz' @@ -617,11 +617,9 @@ class Dataset(object): See :ref:`dyncols` for an in-depth example. """ - col = list(col) - # Callable Columns... - if len(col) == 1 and hasattr(col[0], '__call__'): - col = list(map(col[0], self._data)) + if hasattr(col, '__call__'): + col = list(map(col, self._data)) col = self._clean_col(col) self._validate(col=col) |
