def __new__(cls,*arg,**kwargs):
        """ Upgrade of the new function to enable the
        _properties,_side_properties and _derived_properties tricks
        """
        obj = super(BaseObject,cls).__new__(cls)
        obj._properties_keys         = copy.copy([])
        obj._side_properties_keys    = copy.copy([])
        obj._derived_properties_keys = copy.copy([])
        # ---------------------------------------------
        # - load also the properties of all the Parents
        for c in obj.__class__.__mro__:
            if "PROPERTIES" in dir(c):
                obj._properties_keys += c.PROPERTIES
            if "SIDE_PROPERTIES" in dir(c):
                obj._side_properties_keys += c.SIDE_PROPERTIES
            if "DERIVED_PROPERTIES" in dir(c):
                obj._derived_properties_keys += c.DERIVED_PROPERTIES

        # -----------------
        # - avoid doublons
        obj._properties_keys         = np.unique(obj._properties_keys).tolist()
        obj._side_properties_keys    = np.unique(obj._side_properties_keys).tolist()
        obj._derived_properties_keys = np.unique(obj._derived_properties_keys).tolist()
        
        # -- keys
        if "_properties" not in dir(obj):
            obj._properties = {}
            obj._side_properties = {}
            obj._derived_properties = {}

        # -- fill empty
        for k in obj._properties_keys:
            if k in obj._properties.keys():
                warnings.warn("%s is already build.  Conflit => new key ignored"%k)
                continue
            obj._properties[k] = None
            
        for k in obj._side_properties_keys:
            if k in obj._side_properties.keys():
                warnings.warn("%s is already build.  Conflit => new key ignored"%k)
                continue
            obj._side_properties[k] = None
            
        for k in obj._derived_properties_keys:
            if k in obj._derived_properties.keys():
                warnings.warn("%s is already build.  Conflit => new key ignored"%k)
                continue
            obj._derived_properties[k] = None

            
        return obj
def __new__ ( cls , * arg , ** kwargs ) : obj = super ( BaseObject , cls ) . __new__ ( cls ) obj . _properties_keys = copy . copy ( [ ] ) obj . _side_properties_keys = copy . copy ( [ ] ) obj . _derived_properties_keys = copy . copy ( [ ] ) for c in obj . __class__ . __mro__ : if "PROPERTIES" in dir ( c ) : obj . _properties_keys += c . PROPERTIES if "SIDE_PROPERTIES" in dir ( c ) : obj . _side_properties_keys += c . SIDE_PROPERTIES if "DERIVED_PROPERTIES" in dir ( c ) : obj . _derived_properties_keys += c . DERIVED_PROPERTIES obj . _properties_keys = np . unique ( obj . _properties_keys ) . tolist ( ) obj . _side_properties_keys = np . unique ( obj . _side_properties_keys ) . tolist ( ) obj . _derived_properties_keys = np . unique ( obj . _derived_properties_keys ) . tolist ( ) if "_properties" not in dir ( obj ) : obj . _properties = { } obj . _side_properties = { } obj . _derived_properties = { } for k in obj . _properties_keys : if k in obj . _properties . keys ( ) : warnings . warn ( "%s is already build.  Conflit => new key ignored" % k ) continue obj . _properties [ k ] = None for k in obj . _side_properties_keys : if k in obj . _side_properties . keys ( ) : warnings . warn ( "%s is already build.  Conflit => new key ignored" % k ) continue obj . _side_properties [ k ] = None for k in obj . _derived_properties_keys : if k in obj . _derived_properties . keys ( ) : warnings . warn ( "%s is already build.  Conflit => new key ignored" % k ) continue obj . _derived_properties [ k ] = None return obj
Upgrade of the new function to enable the
        _properties,_side_properties and _derived_properties tricks