diff --git a/PKG-INFO b/PKG-INFO index e78ce8a..3e76b67 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -1,12 +1,12 @@ Metadata-Version: 1.0 Name: texttable -Version: 1.0.0 +Version: 1.1.0 Summary: module for creating simple ASCII tables Home-page: https://github.com/foutaise/texttable/ Author: Gerome Fournier Author-email: jef@foutaise.org License: LGPL -Download-URL: https://github.com/foutaise/texttable/archive/v1.0.0.tar.gz +Download-URL: https://github.com/foutaise/texttable/archive/v1.1.0.tar.gz Description: texttable is a module to generate a formatted text table, using ASCII characters. Platform: any diff --git a/README.md b/README.md index c7d195f..91bf3bb 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Python module for creating simple ASCII tables ## Availability -This module is available on [PypI](https://pypi.python.org/pypi/texttable/1.0.0), and has been packaged for several Linux/Unix platforms +This module is available on [PypI](https://pypi.python.org/pypi/texttable/1.1.0), and has been packaged for several Linux/Unix platforms ([Debian](https://packages.debian.org/search?&searchon=names&keywords=python-texttable+), [FreeBSD](https://www.freebsd.org/cgi/ports.cgi?query=texttable&stype=all), Fedora, Suse...). @@ -197,10 +197,10 @@ DATA __author__ = 'Gerome Fournier ' __credits__ = 'Jeff Kowalczyk:\n - textwrap improved import\n ...at... __license__ = 'LGPL' - __version__ = '1.0.0' + __version__ = '1.1.0' VERSION - 1.0.0 + 1.1.0 AUTHOR Gerome Fournier diff --git a/setup.py b/setup.py index b529a4a..90ba529 100644 --- a/setup.py +++ b/setup.py @@ -33,11 +33,11 @@ setup( name = "texttable", - version = "1.0.0", + version = "1.1.0", author = "Gerome Fournier", author_email = "jef@foutaise.org", url = "https://github.com/foutaise/texttable/", - download_url = "https://github.com/foutaise/texttable/archive/v1.0.0.tar.gz", + download_url = "https://github.com/foutaise/texttable/archive/v1.1.0.tar.gz", license = "LGPL", py_modules = ["texttable"], description = DESCRIPTION, diff --git a/texttable.py b/texttable.py index ea5180e..5d08863 100644 --- a/texttable.py +++ b/texttable.py @@ -76,7 +76,7 @@ __author__ = 'Gerome Fournier ' __license__ = 'LGPL' -__version__ = '1.0.0' +__version__ = '1.1.0' __credits__ = """\ Jeff Kowalczyk: - textwrap improved import @@ -277,8 +277,8 @@ def set_cols_valign(self, array): def set_cols_dtype(self, array): """Set the desired columns datatype for the cols. - - the elements of the array should be either a callable or any of "a", - "t", "f", "e" or "i": + - the elements of the array should be either a callable or any of + "a", "t", "f", "e", "i" or a callable: * "a": automatic (try to use the most appropriate datatype) * "t": treat as text @@ -469,18 +469,14 @@ def _str(self, i, x): n = self._precision dtype = self._dtype[i] - if not callable(dtype): - dtype = FMT[dtype] - try: - try: - return dtype(x, n=n) - except TypeError: + if callable(dtype): return dtype(x) + else: + return FMT[dtype](x, n=n) except FallbackToText: return self._fmt_text(x) - def _check_row_size(self, array): """Check that the specified array fits the previous rows size """