From 8ee34f3117bae2fa93ffa9fea4a74367148fd498 Mon Sep 17 00:00:00 2001 From: Arkadiusz Bulski Date: Fri, 19 Jan 2018 22:06:36 +0100 Subject: [PATCH] fixed pep8 --- kaitaistruct.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/kaitaistruct.py b/kaitaistruct.py index 6ab03d8..de91ac4 100644 --- a/kaitaistruct.py +++ b/kaitaistruct.py @@ -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()