Did I find the right examples for you? yes no

All Samples(98)  |  Call(83)  |  Derive(0)  |  Import(15)
Return true if the object is a user-defined generator function.

Generator function objects provides same attributes as functions.

See help(isfunction) for attributes listing.

        def isgeneratorfunction(object):
    """Return true if the object is a user-defined generator function.

    Generator function objects provides same attributes as functions.

    See help(isfunction) for attributes listing."""
    return bool((isfunction(object) or ismethod(object)) and
                object.func_code.co_flags & CO_GENERATOR)
        


src/n/a/natto-0.1.7/natto/__init__.py   natto(Download)
        or inspect.isframe(data) \
        or inspect.isfunction(data) \
        or inspect.isgeneratorfunction(data) \
        or inspect.isgetsetdescriptor(data) \
        or inspect.ismemberdescriptor(data) \

src/a/s/aspectlib-0.9.0/src/aspectlib/__init__.py   aspectlib(Download)
from inspect import isfunction
from inspect import isgenerator
from inspect import isgeneratorfunction
from inspect import ismethod
from inspect import ismethoddescriptor
    def __init__(self, advising_function):
        if not isgeneratorfunction(advising_function):
            raise ExpectedGeneratorFunction("advising_function %s must be a generator function." % advising_function)
        self.advising_function = advising_function
 
    def __call__(self, cutpoint_function):
        if isgeneratorfunction(cutpoint_function):

src/a/n/antisocial-HEAD/ve/lib/python2.7/site-packages/nose/pyversion.py   antisocial(Download)
    def isgenerator(o):
        if isinstance(o, UnboundMethod):
            o = o._func
        return inspect.isgeneratorfunction(o) or inspect.isgenerator(o)
else:

src/p/y/python-aspectlib-HEAD/src/aspectlib/__init__.py   python-aspectlib(Download)
from inspect import isfunction
from inspect import isgenerator
from inspect import isgeneratorfunction
from inspect import ismethod
from inspect import ismethoddescriptor
    def __init__(self, advising_function):
        if not isgeneratorfunction(advising_function):
            raise ExpectedGeneratorFunction("advising_function %s must be a generator function." % advising_function)
        self.advising_function = advising_function
 
    def __call__(self, cutpoint_function):
        if isgeneratorfunction(cutpoint_function):

src/r/o/rolf-HEAD/ve/lib/python2.7/site-packages/nose/pyversion.py   rolf(Download)
    def isgenerator(o):
        if isinstance(o, UnboundMethod):
            o = o._func
        return inspect.isgeneratorfunction(o) or inspect.isgenerator(o)
else:

src/k/u/kuma-lib-HEAD/packages/nose/nose/pyversion.py   kuma-lib(Download)
    def isgenerator(o):
        if isinstance(o, UnboundMethod):
            o = o._func
        return inspect.isgeneratorfunction(o) or inspect.isgenerator(o)
else:

src/h/a/habitat-HEAD/habitat/utils/dynamicloader.py   habitat(Download)
def isgeneratorfunction(thing):
    """is *thing* a generator function?"""
    return inspect.isgeneratorfunction(thing)
 
 

src/f/j/fjord-HEAD/vendor/packages/nose/nose/pyversion.py   fjord(Download)
    def isgenerator(o):
        if isinstance(o, UnboundMethod):
            o = o._func
        return inspect.isgeneratorfunction(o) or inspect.isgenerator(o)
else:

src/c/a/captain-HEAD/vendor/lib/python/nose/pyversion.py   captain(Download)
    def isgenerator(o):
        if isinstance(o, UnboundMethod):
            o = o._func
        return inspect.isgeneratorfunction(o) or inspect.isgenerator(o)
else:

src/n/o/nose-for-sneeze-1.3.0/nose/pyversion.py   nose-for-sneeze(Download)
    def isgenerator(o):
        if isinstance(o, UnboundMethod):
            o = o._func
        return inspect.isgeneratorfunction(o) or inspect.isgenerator(o)
else:

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8  Next