Skip to content

Commit

Permalink
fixed pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
arekbulski authored Jan 19, 2018
1 parent 2dbe3a8 commit 8ee34f3
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions kaitaistruct.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,9 @@ def __init__(self, stream):
def __enter__(self):
return self

def _reprGeneratorForAllProps(self):
"""Generator to use in own __repr__ functions"""
return (str(k)+"="+repr(v) for k, v in self.__dict__.items() if k[0]!="_")

def __repr__(self):
return "".join((self.__class__.__name__, "(", ", ".join(self._reprGeneratorForAllProps(self)), ")"))
reprGeneratorForAllProps = (str(k)+"="+repr(v) for k, v in self.__dict__.items() if k[0]!="_")
return "".join((self.__class__.__name__, "(", ", ".join(reprGeneratorForAllProps), ")"))

def __exit__(self, *args, **kwargs):
self.close()
Expand Down

0 comments on commit 8ee34f3

Please sign in to comment.