Skip to content

Commit 6bbfccd

Browse files
lostellalanking520
authored andcommitted
Fixed __setattr__ method of _MXClassPropertyMetaClass (apache#12811)
* fixed indentation * simplified code
1 parent bd7115a commit 6bbfccd

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

python/mxnet/base.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,7 @@ def setter(self, func):
165165

166166
class _MXClassPropertyMetaClass(type):
167167
def __setattr__(cls, key, value):
168-
if key in cls.__dict__:
169-
obj = cls.__dict__.get(key)
168+
obj = cls.__dict__.get(key)
170169
if obj and isinstance(obj, _MXClassPropertyDescriptor):
171170
return obj.__set__(cls, value)
172171

0 commit comments

Comments
 (0)