summaryrefslogtreecommitdiff
path: root/tablib/helpers.py
diff options
context:
space:
mode:
authorKenneth Reitz <me@kennethreitz.com>2011-02-17 16:31:52 -0500
committerKenneth Reitz <me@kennethreitz.com>2011-02-17 16:31:52 -0500
commitccb29c68fa814424f9fc761fc6ab3d24779a8cc6 (patch)
treefb91e7b7526e8c80a82af527ce8d0e810f34d815 /tablib/helpers.py
parente077a7f2bc8b37b36ac0da569c244f977c400254 (diff)
downloadtablib-ccb29c68fa814424f9fc761fc6ab3d24779a8cc6.tar.gz
*shutter* making everyone else happy
Diffstat (limited to 'tablib/helpers.py')
-rw-r--r--tablib/helpers.py40
1 files changed, 20 insertions, 20 deletions
diff --git a/tablib/helpers.py b/tablib/helpers.py
index f75c466..718d159 100644
--- a/tablib/helpers.py
+++ b/tablib/helpers.py
@@ -7,31 +7,31 @@ import sys
class Struct(object):
- """Your attributes are belong to us."""
-
- def __init__(self, **entries):
- self.__dict__.update(entries)
-
- def __getitem__(self, key):
- return getattr(self, key, None)
+ """Your attributes are belong to us."""
+
+ def __init__(self, **entries):
+ self.__dict__.update(entries)
+
+ def __getitem__(self, key):
+ return getattr(self, key, None)
- def dictionary(self):
- """Returns dictionary representation of object."""
- return self.__dict__
+ def dictionary(self):
+ """Returns dictionary representation of object."""
+ return self.__dict__
- def items(self):
- """Returns items within object."""
- return self.__dict__.items()
+ def items(self):
+ """Returns items within object."""
+ return self.__dict__.items()
- def keys(self):
- """Returns keys within object."""
- return self.__dict__.keys()
+ def keys(self):
+ """Returns keys within object."""
+ return self.__dict__.keys()
def piped():
- """Returns piped input via stdin, else False."""
- with sys.stdin as stdin:
- # TTY is only way to detect if stdin contains data
- return stdin.read() if not stdin.isatty() else None
+ """Returns piped input via stdin, else False."""
+ with sys.stdin as stdin:
+ # TTY is only way to detect if stdin contains data
+ return stdin.read() if not stdin.isatty() else None