From: Luke Kenneth Casson Leighton Date: Thu, 11 Apr 2019 15:57:42 +0000 (+0100) Subject: no need to use self.__dict__ X-Git-Tag: ls180-24jan2020~1258 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=db5224f87018f3f214529b2b5f608bf10b90209d;p=ieee754fpu.git no need to use self.__dict__ --- diff --git a/src/add/singlepipe.py b/src/add/singlepipe.py index ff402c60..e8d16ef5 100644 --- a/src/add/singlepipe.py +++ b/src/add/singlepipe.py @@ -181,12 +181,12 @@ class RecordObject(Record): def __setattr__(self, k, v): if k in dir(Record) or "fields" not in self.__dict__: return object.__setattr__(self, k, v) - self.__dict__["fields"][k] = v + self.fields[k] = v if isinstance(v, Record): newlayout = {k: (k, v.layout)} else: newlayout = {k: (k, v.shape())} - self.__dict__["layout"].fields.update(newlayout) + self.layout.fields.update(newlayout)