Remove repeated func from gmt/decorators.py
@@ -305,38 +305,3 @@ def parse_region(module_func):
return module_func(*args, **kwargs)
return new_module
-
-
-def is_nonstr_iter(value):
- """
- Check if the value is not a string but is iterable (list, tuple, array)
-
- Parameters
- ----------
- value
- What you want to check.
-
- Returns
- -------
- is_iterable : bool
- Whether it is a non-string iterable or not.
-
- Examples
- --------
-
- >>> is_nonstr_iter('abc')
- False
- >>> is_nonstr_iter(10)
- False
- >>> is_nonstr_iter([1, 2, 3])
- True
- >>> is_nonstr_iter((1, 2, 3))
- True
-
- """
- try:
- [item for item in value] # pylint: disable=pointless-statement
- is_iterable = True
- except TypeError:
- is_iterable = False
- return bool(not isinstance(value, str) and is_iterable)
