MCPcopy Create free account
hub / github.com/numpy/numpy / is_pathlib_path

Function is_pathlib_path

numpy/compat/py3k.py:83–89  ·  view source on GitHub ↗

Check whether obj is a `pathlib.Path` object. Prefer using ``isinstance(obj, os.PathLike)`` instead of this function.

(obj)

Source from the content-addressed store, hash-verified

81 return asunicode(x)
82
83def is_pathlib_path(obj):
84 """
85 Check whether obj is a `pathlib.Path` object.
86
87 Prefer using ``isinstance(obj, os.PathLike)`` instead of this function.
88 """
89 return isinstance(obj, Path)
90
91# from Python 3.7
92class contextlib_nullcontext:

Callers 1

__new__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected