MCPcopy Create free account
hub / github.com/NCAR/wrf-python / viewvalues

Function viewvalues

src/wrf/py3compat.py:44–59  ·  view source on GitHub ↗

Return either the values or viewvalues method for a dictionary. Args: d (:obj:`dict`): A dictionary. Returns: view method: Either the values or viewvalues method.

(d)

Source from the content-addressed store, hash-verified

42
43
44def viewvalues(d):
45 """Return either the values or viewvalues method for a dictionary.
46
47 Args:
48
49 d (:obj:`dict`): A dictionary.
50
51 Returns:
52
53 view method: Either the values or viewvalues method.
54
55 """
56 func = getattr(d, "viewvalues", None)
57 if func is None:
58 func = d.values
59 return func()
60
61
62def isstr(s):

Callers 1

func_wrapperFunction · 0.85

Calls 1

funcFunction · 0.70

Tested by

no test coverage detected