Try to get property helper functions of given object and property name. :param obj: object to be checked for property :param key: property name :return: a tuple for helper functions(fget, fset, fdel). If no such property, a (None, None, None) returns
(obj, key)
| 274 | |
| 275 | |
| 276 | def _get_property_func(obj, key): |
| 277 | """ |
| 278 | Try to get property helper functions of given object and property name. |
| 279 | |
| 280 | :param obj: object to be checked for property |
| 281 | :param key: property name |
| 282 | :return: a tuple for helper functions(fget, fset, fdel). If no such property, a (None, None, None) returns |
| 283 | """ |
| 284 | attr = getattr(type(obj), key, None) |
| 285 | if not isinstance(attr, property): |
| 286 | return None, None, None |
| 287 | return attr.fget, attr.fset, attr.fdel |
| 288 | |
| 289 | |
| 290 | class Box(dict): |
no outgoing calls
no test coverage detected