Did I find the right examples for you? yes no

All Samples(5620)  |  Call(5169)  |  Derive(0)  |  Import(451)
Return true if the object is a class.

Class objects provide these attributes:
    __doc__         documentation string
    __module__      name of module in which this class was defined

        def isclass(object):
    """Return true if the object is a class.

    Class objects provide these attributes:
        __doc__         documentation string
        __module__      name of module in which this class was defined"""
    return isinstance(object, (type, types.ClassType))
        


src/h/u/hunch-sample-app-HEAD/django/test/_doctest.py   hunch-sample-app(Download)
        elif inspect.isfunction(object):
            return module.__dict__ is object.func_globals
        elif inspect.isclass(object):
            return module.__name__ == object.__module__
        elif inspect.getmodule(object) is not None:
                valname = '%s.%s' % (name, valname)
                # Recurse to functions & classes.
                if ((inspect.isfunction(val) or inspect.isclass(val)) and
                    self._from_module(module, val)):
                    self._find(tests, val, valname, module, source_lines,
                                     "must be strings: %r" %
                                     (type(valname),))
                if not (inspect.isfunction(val) or inspect.isclass(val) or
                        inspect.ismethod(val) or inspect.ismodule(val) or
                        isinstance(val, basestring)):
 
        # Look for tests in a class's contained objects.
        if inspect.isclass(obj) and self._recurse:
            for valname, val in obj.__dict__.items():
                # Check if this contained object should be ignored.
 
                # Recurse to methods, properties, and nested classes.
                if ((inspect.isfunction(val) or inspect.isclass(val) or
                      isinstance(val, property)) and
                      self._from_module(module, val)):

src/m/o/modern-python-example-HEAD/lib/python2.7/site-packages/logilab/astng/raw_building.py   modern-python-example(Download)
import sys
from os.path import abspath
from inspect import (getargspec, isdatadescriptor, isfunction, ismethod,
                     ismethoddescriptor, isclass, isbuiltin)
 
                    continue
                object_build_methoddescriptor(node, member, name)
            elif isclass(member):
                if self.imported_member(node, member, name):
                    continue

src/s/a/sampledoc-HEAD/sphinxext/docscrape.py   sampledoc(Download)
    def get_func(self):
        func_name = getattr(self._f, '__name__', self.__class__.__name__)
        if inspect.isclass(self._f):
            func = getattr(self._f, '__call__', self._f.__init__)
        else:
    def __init__(self,cls,modulename='',func_doc=FunctionDoc,doc=None):
        if not inspect.isclass(cls):
            raise ValueError("Initialise using a class. Got %r" % cls)
        self._cls = cls
 

src/a/l/ally-py-0.9.0/__unit_test__/ally/support/sqlalchemy/samples/impl/entity.py   ally-py(Download)
from ally.support.sqlalchemy.session import SessionSupport
from ally.support.sqlalchemy.util_service import buildQuery, buildLimits, handle
from inspect import isclass
from sqlalchemy.exc import SQLAlchemyError, OperationalError
import logging
            The query mapped class if there is one.
        '''
        assert isclass(Entity), 'Invalid class %s' % Entity
        assert isinstance(Entity, MappedSupport), 'Invalid mapped class %s' % Entity
        self.modelType = typeFor(Entity)
 
        if QEntity is not None:
            assert isclass(QEntity), 'Invalid class %s' % QEntity
            self.queryType = typeFor(QEntity)
            assert isinstance(self.queryType, TypeQuery), 'Invalid query class %s' % QEntity

src/s/a/sampledoc-HEAD/sphinxext/inheritance_diagram.py   sampledoc(Download)
 
        # If a class, just return it
        if inspect.isclass(todoc):
            return [todoc]
        elif inspect.ismodule(todoc):
            classes = []
            for cls in todoc.__dict__.values():
                if inspect.isclass(cls) and cls.__module__ == todoc.__name__:

src/o/t/ottwatch-HEAD/lib/gdata/samples/apps/marketplace_sample/atom/core.py   ottwatch(Download)
        if (isinstance(member_type, tuple) or isinstance(member_type, list)
            or isinstance(member_type, (str, unicode))
            or (inspect.isclass(member_type)
                and issubclass(member_type, XmlElement))):
          members.append(pair)

src/g/d/gdata-2.0.18/samples/apps/marketplace_sample/atom/core.py   gdata(Download)
        if (isinstance(member_type, tuple) or isinstance(member_type, list)
            or isinstance(member_type, (str, unicode))
            or (inspect.isclass(member_type)
                and issubclass(member_type, XmlElement))):
          members.append(pair)

src/g/o/googleads-python-legacy-lib-HEAD/tests/adspygoogle/adwords/examples/alltests.py   googleads-python-legacy-lib(Download)
  module = __import__(test)
  for name, obj in inspect.getmembers(module):
    if inspect.isclass(obj):
      suite.addTest(unittest.makeSuite(obj))
 

src/s/a/sampledoc-HEAD/sphinxext/docscrape_sphinx.py   sampledoc(Download)
def get_doc_object(obj, what=None, doc=None):
    if what is None:
        if inspect.isclass(obj):
            what = 'class'
        elif inspect.ismodule(obj):

src/m/o/modern-python-example-HEAD/lib/python2.7/site-packages/logilab/common/sphinxutils.py   modern-python-example(Download)
            modmembers = []
            for objname, obj in module_members(module):
                if inspect.isclass(obj):
                    classmembers = class_members(obj)
                    classes.append( (objname, classmembers) )

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