wrf.get_id

wrf.get_id(obj, prefix='')

Return the cache id.

The cache id is used as a caching key for various routines. If the object type is a mapping, then the result will also be a mapping of each key to the object id for the value.

Parameters:
  • obj (object) – Any object type.
  • prefix (str) – A string to help with recursive calls.
Returns:

If the obj parameter is not a mapping, then the object id is returned. Otherwise, a mapping of each key to the object id for the value is returned.

Return type:

int or dict