# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/12_iter.ipynb.

# %% auto 0
__all__ = ['isiterproduct', 'isiproduct', 'isiterprod', 'isproduct', 'isiprod', 'isiternotstrbytes', 'isiternotstr', 'notiterstr',
           'iternotstr']

# %% ../nbs/12_iter.ipynb 4
import itertools
from typing import TypeGuard

from typing import Iterable

# %% ../nbs/12_iter.ipynb 5
from .atyp import sbytes, notsbytes, StrBytes, NotStrBytes
from .core import isiter
from .strs import notstrbytes

# %% ../nbs/12_iter.ipynb 7
def isiterproduct(x) -> TypeGuard[itertools.product]:
    '''Checks if `x` is an `itertools.product`.
    
    See Also
    --------
    isiprod : Alias for `isiterproduct`.
    isproduct : Alias for `isiterproduct`.
    isiproduct : Alias for `isiterproduct`.
    isiterprod : Alias for `isiterproduct`.
    '''
    return isiter(x) and isinstance(x, itertools.product)

def isiproduct(x) -> TypeGuard[itertools.product]:
    '''Checks if `x` is an `itertools.product`.
    
    See Also
    --------
    isiprod : Alias for `isiproduct`.
    isproduct : Alias for `isiproduct`.    
    isiterprod : Alias for `isiproduct`.
    isiterproduct : Alias for `isiproduct`.
    '''
    return isiterproduct(x)

def isiterprod(x) -> TypeGuard[itertools.product]:
    '''Checks if `x` is an `itertools.product`.
    
    See Also
    --------
    isiprod : Alias for `isiterprod`.
    isproduct : Alias for `isiterprod`.
    isiproduct : Alias for `isiterprod`.
    isiterproduct : Alias for `isiterprod`.
    '''
    return isiterproduct(x)

def isproduct(x) -> TypeGuard[itertools.product]:
    '''Checks if `x` is an `itertools.product`.
    
    See Also
    --------
    isiprod : Alias for `isproduct`.
    isiproduct : Alias for `isproduct`.
    isiterprod : Alias for `isproduct`.
    isiterproduct : Alias for `isproduct`.
    '''
    return isiterproduct(x)

def isiprod(x) -> TypeGuard[itertools.product]:
    '''Checks if `x` is an `itertools.product`.
    
    See Also
    --------
    isproduct : Alias for `isiprod`.
    isiproduct : Alias for `isiprod`.
    isiterprod : Alias for `isiprod`.
    isiterproduct : Alias for `isiprod`.
    '''
    return isiterproduct(x)

# %% ../nbs/12_iter.ipynb 8
def isiternotstrbytes(x) -> TypeGuard[Iterable[notsbytes]]:
    '''Checks if `x` is an iterable containing elements other than strings or bytes.
    
    See Also
    --------
    isiternotstr : Alias for `isiternotstrbytes`.
    notiterstr : Alias for `isiternotstrbytes`.
    iternotstr : Alias for `isiternotstrbytes`.
    '''
    return isiter(x) and notstrbytes(x)


def isiternotstr(x) -> TypeGuard[Iterable[notsbytes]]:
    '''Checks if `x` is an iterable containing elements other than strings or bytes.
    
    See Also
    --------
    isiternotstrbytes : Alias for `isiternotstr`.
    notiterstr : Alias for `isiternotstr`.
    iternotstr : Alias for `isiternotstr`.
    '''
    return isiternotstrbytes(x)


def notiterstr(x) -> TypeGuard[Iterable[notsbytes]]:
    '''Checks if `x` is an iterable containing elements other than strings or bytes.
    
    See Also
    --------
    isiternotstrbytes : Alias for `notiterstr`.
    isiternotstr : Alias for `notiterstr`.
    iternotstr : Alias for `notiterstr`.
    '''
    return isiternotstrbytes(x)


def iternotstr(x) -> TypeGuard[Iterable[notsbytes]]:
    '''Checks if `x` is an iterable containing elements other than strings or bytes.
    
    See Also
    --------
    isiternotstrbytes : Alias for `iternotstr`.
    isiternotstr : Alias for `iternotstr`.
    notiterstr : Alias for `iternotstr`.
    '''
    return isiternotstrbytes(x)
