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

Function isstr

src/wrf/py3compat.py:62–77  ·  view source on GitHub ↗

Return True if the object is a string type. Args: s (string): A string (str, unicode, bytes). Returns: :obj:`bool`: True if the object is a type of string. Otherwise, False.

(s)

Source from the content-addressed store, hash-verified

60
61
62def isstr(s):
63 """Return True if the object is a string type.
64
65 Args:
66
67 s (string): A string (str, unicode, bytes).
68
69 Returns:
70
71 :obj:`bool`: True if the object is a type of string. Otherwise, False.
72
73 """
74 try:
75 return isinstance(s, basestring)
76 except NameError:
77 return isinstance(s, str)
78
79
80# Python 2 rounding behavior

Callers 6

func_wrapperFunction · 0.85
is_multi_fileFunction · 0.85
extract_global_attrsFunction · 0.85
_build_data_arrayFunction · 0.85
extract_varsFunction · 0.85
from_argsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected