You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by zh...@apache.org on 2018/11/07 18:23:22 UTC

[incubator-mxnet] branch v1.3.x updated: Fixed __setattr__ method of _MXClassPropertyMetaClass (v1.3.x) (#13157)

This is an automated email from the ASF dual-hosted git repository.

zhasheng pushed a commit to branch v1.3.x
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/v1.3.x by this push:
     new 9f8aa60  Fixed __setattr__ method of _MXClassPropertyMetaClass (v1.3.x) (#13157)
9f8aa60 is described below

commit 9f8aa604c5911b19c77e6e10ebdc6161555d6ca3
Author: Anton Chernov <me...@gmail.com>
AuthorDate: Wed Nov 7 19:22:45 2018 +0100

    Fixed __setattr__ method of _MXClassPropertyMetaClass (v1.3.x) (#13157)
    
    * 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 11f06a4..7245547 100644
--- a/python/mxnet/base.py
+++ b/python/mxnet/base.py
@@ -165,8 +165,7 @@ class _MXClassPropertyDescriptor(object):
 
 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)