# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/04_flags.ipynb.

# %% auto 0
__all__ = ['fpos', 'fneg', 'fint', 'fnum', 'fstr', 'fzero', 'fnone', 'ispos', 'isneg', 'isint', 'isnum', 'isstr', 'iszero',
           'isnone']

# %% ../nbs/04_flags.ipynb 3
from numbers import Number
from bflag.bflag import (bflag)

# %% ../nbs/04_flags.ipynb 5
fpos = bflag(lambda v: v > 0, name='fpos')
fneg = bflag(lambda v: v < 0, name='fneg')
fint = bflag(lambda v: isinstance(v, int), name='fint')
fnum = bflag(lambda v: isinstance(v, Number), name='fnum')
fstr = bflag(lambda v: isinstance(v, str), name='fstr')
fzero = bflag(lambda v: v == 0, name='fzero')
fnone = bflag(lambda v: v is None, name='fnone')

# %% ../nbs/04_flags.ipynb 7
def ispos(v): return v > 0
def isneg(v): return v < 0
def isint(v): return isinstance(v, int)
def isnum(v): return isinstance(v, Number)
def isstr(v): return isinstance(v, str)
def iszero(v): return v == 0
def isnone(v): return v is None

fpos = bflag(ispos, name='fpos')
fneg = bflag(isneg, name='fneg')
fint = bflag(isint, name='fint')
fnum = bflag(isnum, name='fnum')
fstr = bflag(isstr, name='fstr')
fzero = bflag(iszero, name='fzero')
fnone = bflag(isnone, name='fnone')
