check_string#
- check_string(obj: str, /, *, allow_subclass: bool = True, name: str = 'Object') None[source]#
Check if an object is an instance of
str.- Parameters:
- Raises:
TypeErrorIf input is not an instance of
str.
Examples#
Download Python source code | Download Jupyter notebook
Check if an object is a string.
>>> from pyvista import _validation
>>> _validation.check_string('eggs')