From fe2c4d8e8c77951afc9ab068e1279b3823a43d25 Mon Sep 17 00:00:00 2001 From: Lorenzo Stella Date: Wed, 17 Oct 2018 08:15:49 +0200 Subject: [PATCH] Fixed __setattr__ method of _MXClassPropertyMetaClass (#12811) * fixed indentation * simplified code --- python/mxnet/base.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/mxnet/base.py b/python/mxnet/base.py index 84b9e5831c69..7276c5234c9c 100644 --- a/python/mxnet/base.py +++ b/python/mxnet/base.py @@ -165,8 +165,7 @@ def setter(self, func): class _MXClassPropertyMetaClass(type): def __setattr__(cls, key, value): - if key in cls.__dict__: - obj = cls.__dict__.get(key) + obj = cls.__dict__.get(key) if obj and isinstance(obj, _MXClassPropertyDescriptor): return obj.__set__(cls, value)