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

# %% auto 0
__all__ = ['sbytes', 'notsbytes', 'isiternotstrbytes', 'isiternotstr', 'notiterstr', 'iternotstr']

# %% ../nbs/20_iter.ipynb 4
from typing import TypeGuard, TypeAlias, Iterable, ForwardRef

# %% ../nbs/20_iter.ipynb 5
from .core import isstr, isbytes, isiter
from .strs import isstrbytes, notstrbytes
from .tgrd import GuardFunc, TypeLike

# %% ../nbs/20_iter.ipynb 6
try: 
    from atyp import (StrBytes, NotStrBytes)
except ImportError: 
    StrBytes, NotStrBytes = type, type
    
sbytes: TypeAlias  = ForwardRef('StrBytes', module='atyp', is_class=True)
notsbytes: TypeAlias  = ForwardRef('NotStrBytes', module='atyp', is_class=True)

# %% ../nbs/20_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)
