diff options
| author | Kenneth Reitz <me@kennethreitz.com> | 2010-09-25 05:58:40 -0400 |
|---|---|---|
| committer | Kenneth Reitz <me@kennethreitz.com> | 2010-09-25 05:58:40 -0400 |
| commit | 942dd3dadfc8de2956b1179b0d4ae608e68fc64c (patch) | |
| tree | b87066a2c9ff52b81d10f271d8ca19ccc46a730a /tablib | |
| parent | b1d282744cfcc20fd5fc7478e64832b6b484cdfb (diff) | |
| download | tablib-942dd3dadfc8de2956b1179b0d4ae608e68fc64c.tar.gz | |
Added tablib core docstring placeholder.
Diffstat (limited to 'tablib')
| -rw-r--r-- | tablib/core.py | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/tablib/core.py b/tablib/core.py index bc1cbbf..508d8c9 100644 --- a/tablib/core.py +++ b/tablib/core.py @@ -1,11 +1,7 @@ # -*- coding: utf-8 -*- -# _____ ______ ______ _________ -# __ /_______ ____ /_ ___ /_ _____ ______ / -# _ __/_ __ `/__ __ \__ __ \_ _ \_ __ / -# / /_ / /_/ / _ /_/ /_ /_/ // __// /_/ / -# \__/ \__,_/ /_.___/ /_.___/ \___/ \__,_/ - +""" Tablib - core. +""" import csv import cStringIO @@ -34,12 +30,12 @@ class Dataset(object): try: self.headers = kwargs['headers'] - except KeyError, why: + except KeyError: self.headers = None try: self.title = kwargs['title'] - except KeyError, why: + except KeyError: self.title = None self._register_formats() @@ -81,7 +77,7 @@ class Dataset(object): for fmt in formats: try: setattr(cls, fmt.title, property(fmt.export_set)) - except Exception, why: + except Exception: pass @@ -130,10 +126,10 @@ class Dataset(object): """Returns the width of the Dataset.""" try: return len(self._data[0]) - except IndexError, why: + except IndexError: try: return len(self.headers) - except TypeError, e: + except TypeError: return 0 @@ -150,7 +146,7 @@ class Dataset(object): if collection: try: self.__headers = list(collection) - except TypeError, why: + except TypeError: raise TypeError else: self.__headers = None @@ -233,7 +229,7 @@ class Databook(object): for fmt in formats: try: setattr(cls, fmt.title, property(fmt.export_book)) - except Exception, why: + except Exception: pass |
