def get_property(obj, name, old_name, default=None):
 if hasattr(obj, old_name):
  warnings.warn(('Property %s is obsolete, please use %s instead' % (old_name, name)), stacklevel=2)
  return getattr(obj, old_name)
 return getattr(obj, name, default)

def get_property ( obj , name , old_name , default = None ) : if hasattr ( obj , old_name ) : warnings . warn ( ( 'Property %s is obsolete, please use %s instead' % ( old_name , name ) ) , stacklevel = 2 ) return getattr ( obj , old_name ) return getattr ( obj , name , default )
check if old property name exists and if it does - show warning message and return value .