parameters: (name_dict)
return_statement: return wrap_deprecated_attr
docstring: name_dict: {'old_property_name': 'new_property_name'}
docstring_summary: name_dict: {'old_property_name': 'new_property_name'}
docstring_tokens: name_dict : { old_property_name : new_property_name }
function: def deprecated_attr(name_dict):
      """ name_dict: {'old_property_name': 'new_property_name'}"""
      def wrap_deprecated_attr(func):
          def wrapfunc(self, name):
              clzname = self.__class__.__name__
              if name in name_dict:
                  if name_dict[name] is None:
                      #print('Removed warning: the {}.{} will be removed!'.format(clzname, name))
                      print('警告: "{}.{}" 接口已被删除!'.format(clzname, name))
                  else:
                      print(
                          #'Deprecated warning: the "{}.{}" will be deprecated, please use: "{}.{}"'.
                          '警告: "{}.{}" 即将被废弃，请使用 "{}.{}" 代替'.format(
                              clzname, name, clzname, name_dict[name]
                          )
                      )
                  return func(self, name_dict[name])
              if name not in dir(self):
                  raise AttributeError("'{}' object has no attribute '{}'".format(clzname, name))
              return func(self, name)
  
          return wrapfunc
  
      return wrap_deprecated_attr
function_tokens: def deprecated_attr ( name_dict ) : def wrap_deprecated_attr ( func ) : def wrapfunc ( self , name ) : clzname = self . __class__ . __name__ if name in name_dict : if name_dict [ name ] is None : #print('Removed warning: the {}.{} will be removed!'.format(clzname, name)) print ( '警告: "{}.{}" 接口已被删除!'.format(clzname, name)) else : print ( #'Deprecated warning: the "{}.{}" will be deprecated, please use: "{}.{}"'. '警告: "{}.{}" 即将被废弃，请使用 "{}.{}" 代替'.format( clzname , name , clzname , name_dict [ name ] ) ) return func ( self , name_dict [ name ] ) if name not in dir ( self ) : raise AttributeError ( "'{}' object has no attribute '{}'" . format ( clzname , name ) ) return func ( self , name ) return wrapfunc return wrap_deprecated_attr