Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Fixed __setattr__ method of _MXClassPropertyMetaClass (#12811)
Browse files Browse the repository at this point in the history
* fixed indentation

* simplified code
  • Loading branch information
lostella authored and szha committed Oct 17, 2018
1 parent 3b5b2b2 commit fe2c4d8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions python/mxnet/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit fe2c4d8

Please sign in to comment.