• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(90637)  |  Call(88276)  |  Derive(2345)  |  Import(16)
type(object) -> the object's type
type(name, bases, dict) -> a new type

src/p/y/Pyro-3.16/examples/pickle/pickletest.py   Pyro(Download)
def compareObjects(obj1,obj2):
	if type(obj1) is type(obj2):
		t=type(obj1)
		if t in (str,int,dict,tuple):
			return obj1==obj2
			return obj1.args==obj2.args
		if t is Pyro.errors.PyroExceptionCapsule or obj1.__class__==Pyro.errors.PyroExceptionCapsule:
			return type(obj1.excObj)==type(obj2.excObj) and \
				   obj1.__class__==obj2.__class__ and\
				   obj1.excObj.args==obj2.excObj.args and \

src/p/o/pony-build-HEAD/examples/push-cgi-notifier/feedparser.py   pony-build(Download)
            return [(tag['scheme'], tag['term']) for tag in UserDict.__getitem__(self, 'tags')]
        realkey = self.keymap.get(key, key)
        if type(realkey) == types.ListType:
            for k in realkey:
                if UserDict.has_key(self, k):
    def __setitem__(self, key, value):
        for k in self.keymap.keys():
            if key == k:
                key = self.keymap[k]
                if type(key) == types.ListType:
                output = _sanitizeHTML(output, self.encoding)
 
        if self.encoding and type(output) != type(u''):
            try:
                output = unicode(output, self.encoding)
        data = data.replace(''', "'")
        data = data.replace('"', '"')
        if self.encoding and type(data) == type(u''):
            data = data.encode(self.encoding)
        sgmllib.SGMLParser.feed(self, data)

src/c/h/changingsong-HEAD/trunk/samples/plugin_sys/pyutilib/pyutilib/component/core/core.py   changingsong(Download)
class InterfaceMeta(type):
    """Meta class that registered the declaration of an interface"""
 
    def __new__(cls, name, bases, d):
        """Register this interface"""
        extension point.
        """
        if type(key) in (int, long):
            #
            # Q: should this be a warning?  A user _might_ be trying
            if isinstance(path,basestring):
                search_path.append(path)
            elif type(path) is list:
                search_path += path
            else:
                raise PluginError, "Unknown type of path argument: "+str(type(path))
        # Compile the enable expression
        #
        if type(auto_disable) is bool:
            if auto_disable:
                disable_p = re.compile("")

src/a/s/asciiporn-2009.05.01/asciiporn/weave/examples/functional.py   asciiporn(Download)
def c_list_map(func,seq):
    """ Uses CXX C code to implement a simple map-like function.
        It does not provide any error checking.
    """
    assert(type(func) in [FunctionType,MethodType,type(len)])
def c_list_map2(func,seq):
    """ Uses Python API more than CXX to implement a simple map-like function.
        It does not provide any error checking.
    """
    assert(type(func) in [FunctionType,MethodType,type(len)])

src/b/i/bika.lims-3.0rc2.3/bika/lims/content/samplepoint.py   bika.lims(Download)
        bsc = getToolByName(self, 'bika_setup_catalog')
        ## convert value to objects
        if value and type(value) == str:
            value = [bsc(UID=value)[0].getObject(),]
        elif value and type(value) in (list, tuple) and type(value[0]) == str:
            value = [bsc(UID=uid)[0].getObject() for uid in value if uid]
        if not type(value) in (list, tuple):

src/s/l/SlopPy-HEAD/Demo/parser/example.py   SlopPy(Download)
    if vars is None:
        vars = {}
    if type(pattern) is ListType:       # 'variables' are ['varname']
        vars[pattern[0]] = data
        return 1, vars
    if type(pattern) is not TupleType:

src/i/n/IncPy-HEAD/Demo/parser/example.py   IncPy(Download)
    if vars is None:
        vars = {}
    if type(pattern) is ListType:       # 'variables' are ['varname']
        vars[pattern[0]] = data
        return 1, vars
    if type(pattern) is not TupleType:

src/p/e/personis-0.933/personis/examples/aelog/apiclient/model.py   personis(Download)
    astuples = []
    for key, value in params.iteritems():
      if type(value) == type([]):
        for x in value:
          x = x.encode('utf-8')
      patch[key] = None
    elif original_value != modified_value:
      if type(original_value) == type({}):
        # Recursively descend objects
        patch[key] = makepatch(original_value, modified_value)

src/u/n/unladen-swallow-HEAD/Demo/parser/example.py   unladen-swallow(Download)
    if vars is None:
        vars = {}
    if type(pattern) is ListType:       # 'variables' are ['varname']
        vars[pattern[0]] = data
        return 1, vars
    if type(pattern) is not TupleType:

src/p/y/python2.6-HEAD/Demo/parser/example.py   python2.6(Download)
    if vars is None:
        vars = {}
    if type(pattern) is ListType:       # 'variables' are ['varname']
        vars[pattern[0]] = data
        return 1, vars
    if type(pattern) is not TupleType:

Previous  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10  Next