Did I find the right examples for you? yes no

All Samples(196)  |  Call(151)  |  Derive(0)  |  Import(45)
Return true if the object is a generator.

Generator objects provide these attributes:
    __iter__        defined to support interation over container
    close           raises a new GeneratorExit exception inside the
                    generator to terminate the iteration
    gi_code         code object
    gi_frame        frame object or possibly None once the generator has
                    been exhausted
    gi_running      set to 1 when generator is executing, 0 otherwise(more...)

        def isgenerator(object):
    """Return true if the object is a generator.

    Generator objects provide these attributes:
        __iter__        defined to support interation over container
        close           raises a new GeneratorExit exception inside the
                        generator to terminate the iteration
        gi_code         code object
        gi_frame        frame object or possibly None once the generator has
                        been exhausted
        gi_running      set to 1 when generator is executing, 0 otherwise
        next            return the next item from the container
        send            resumes the generator and "sends" a value that becomes
                        the result of the current yield-expression
        throw           used to raise an exception inside the generator"""
    return isinstance(object, types.GeneratorType)
        


src/j/e/jedi-HEAD/jedi/evaluate/compiled/fake.py   jedi(Download)
                or inspect.isbuiltin(obj) or inspect.ismethod(obj)
                or inspect.ismethoddescriptor(obj) or inspect.iscode(obj)
                or inspect.isgenerator(obj))
 

src/s/u/SublimeJEDI-HEAD/jedi/evaluate/compiled/fake.py   SublimeJEDI(Download)
                or inspect.isbuiltin(obj) or inspect.ismethod(obj)
                or inspect.ismethoddescriptor(obj) or inspect.iscode(obj)
                or inspect.isgenerator(obj))
 

src/p/y/pyquickhelper-0.4.108/src/pyquickhelper/helpgen/utils_sphinx_doc_helpers.py   pyquickhelper(Download)
        if inspect.isclass(obj) or \
           inspect.isfunction(obj) or \
           inspect.isgenerator(obj) or \
           inspect.ismethod(obj) :
            cl.append ( ModuleMemberDoc (obj) )

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/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/a/s/aspectlib-0.9.0/src/aspectlib/__init__.py   aspectlib(Download)
from inspect import isclass
from inspect import isfunction
from inspect import isgenerator
from inspect import isgeneratorfunction
from inspect import ismethod
                def advising_generator_wrapper(*args, **kwargs):
                    advisor = self.advising_function(*args, **kwargs)
                    if not isgenerator(advisor):
                        raise ExpectedGenerator("advising_function %s did not return a generator." % self.advising_function)
                    try:
            def advising_function_wrapper(*args, **kwargs):
                advisor = self.advising_function(*args, **kwargs)
                if not isgenerator(advisor):
                    raise ExpectedGenerator("advising_function %s did not return a generator." % self.advising_function)
                try:

src/p/y/python-aspectlib-HEAD/src/aspectlib/__init__.py   python-aspectlib(Download)
from inspect import isclass
from inspect import isfunction
from inspect import isgenerator
from inspect import isgeneratorfunction
from inspect import ismethod
                def advising_generator_wrapper(*args, **kwargs):
                    advisor = self.advising_function(*args, **kwargs)
                    if not isgenerator(advisor):
                        raise ExpectedGenerator("advising_function %s did not return a generator." % self.advising_function)
                    try:
            def advising_function_wrapper(*args, **kwargs):
                advisor = self.advising_function(*args, **kwargs)
                if not isgenerator(advisor):
                    raise ExpectedGenerator("advising_function %s did not return a generator." % self.advising_function)
                try:

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:

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