Did I find the right examples for you? yes no

All Samples(94736)  |  Call(92301)  |  Derive(2419)  |  Import(16)
type(object) -> the object's type
type(name, bases, dict) -> a new type

src/p/y/PyAMF-0.6.1/doc/tutorials/examples/actionscript/guestbook/python/guestbook.py   PyAMF(Download)
def sql_safe(value):
    if isinstance(value, basestring):
        return value.replace("'", "\\'")
    elif isinstance(type(value), (int, float)):
        return value

src/s/q/SQLAlchemy-0.7.10/examples/generic_associations/table_per_related.py   SQLAlchemy(Download)
    def addresses(cls):
        cls.Address = type(
            "%sAddress" % cls.__name__,
            (Address, Base,),
            dict(

src/p/y/python-cookbook-HEAD/cb2_examples/cb2_6_6_sol_1.py   python-cookbook(Download)
    if cls is None:
        # we don't have a suitable class around, so let's make it
        cls = type("%sProxy" % obj_cls.__name__, (Proxy,), {})
        for name in specials:
            name = '__%s__' % name
        known_proxy_classes[key] = cls
    # instantiate and return the needed proxy
    return cls(obj)
 

src/p/y/python-tumblr-HEAD/samples/pygooglechart.py   python-tumblr(Download)
    def __init__(self, data):
        assert(type(self) != Data)  # This is an abstract class
        self.data = data
 
    @classmethod
    def __init__(self, width, height, title=None, legend=None, colours=None,
                 auto_scale=True, x_range=None, y_range=None):
        assert(type(self) != Chart)  # This is an abstract class
        assert(isinstance(width, int))
        assert(isinstance(height, int))
    def __init__(self, *args, **kwargs):
        assert(type(self) != LineChart)  # This is an abstract class
        Chart.__init__(self, *args, **kwargs)
 
#    def get_url_bits(self, data_class=None):
    def __init__(self, *args, **kwargs):
        assert(type(self) != BarChart)  # This is an abstract class
        Chart.__init__(self, *args, **kwargs)
        self.bar_width = None
        self.zero_lines = {}
    def __init__(self, *args, **kwargs):
        assert(type(self) != GroupedBarChart)  # This is an abstract class
        BarChart.__init__(self, *args, **kwargs)
        self.bar_spacing = None
        self.group_spacing = None

src/e/c/ecell-HEAD/ecell4/trunk/doc/sample/ga/ga.py   ecell(Download)
		# --------------------------------------------------------------
		# First generation,
		if type(self.theEliteIndividual) == type(None):
 
			# -----------------------------------------------------
		# [2] Print geno type
		# ------------------------------------
		if type(self.theGenoType) == dict:
			for aKey in self.theGenoType:
				aBuffer += "%s	= %s\n" %(aKey,self.theGenoType[aKey])
		elif type(self.theGenoType) == list:
		# checks type
		# -----------------------------------------------
		if type(aStr) != str:
			aMessage = "%s: \"%s\" is set as \"%s\", but it must be str. \n" \
		           %(SETUP_ERROR,aKey,self.__get(aKey))

src/n/u/numba-0.7.0/numba/pipeline.py   numba(Download)
            classes = tuple(before + [cls] + after)
            name = '__'.join(cls.__name__ for cls in classes)
            cls = type(name, classes, {})
 
        kwds.setdefault("mangled_name", self.mangled_name)
 
        assert 'llvm_module' not in kwds
        return cls(self.context, self.func, ast,
    def transform(self, ast, env):
        raise NotImplementedError('%r does not implement transform!' %
                                  type(self))
 
    def make_specializer(self, cls, ast, env, **kws):

src/c/h/changingsong-HEAD/trunk/samples/config/configparser_test.py   changingsong(Download)
 
bb1 = config2.get('RecentSongs', 'file1')
print ' file1:', type(bb1)
print bb1
bb2 = unicode(config2.get('RecentSongs', 'file2'), 'utf-8')
print ' file2:', type(bb2)
print bb2
bb3 = config2.get('RecentSongs', 'file3')
print ' file3:', type(bb3)
print bb3
bb4 = config2.get('RecentSongs', 'multipleitems')
print ' multipleitems', type(bb4)
print bb4
bb5 = config2.get('RecentSongs', 'maxitems')
print ' maxitems:', type(bb5)

src/m/d/md-HEAD/docs/examples/stm_shelf.py   md(Download)
    def __copy__(self):
	return allocated(type(self), copy_state(readable(self)))
 
    def __reduce__(self):
	return (delayed, (type(self), pid(self)))
	base.__init__(self, *args, **kwargs)
 
    return type(name, (PCursor, base), dict(
	    __slots__ = ('__pid__', ),
	    __module__ = __name__,
		    del self.store[key]
		else:
		    self.store[key] = (type(cursor), state)
	self.store.sync()
 

src/b/a/badger-lib-HEAD/packages/pyparsing/examples/dfmparse.py   badger-lib(Download)
def get_filename_list(tf):
    import sys, glob
    if tf == None:
        tf = sys.argv[1:]
    elif type(tf) == str:

src/g/o/google-data-api-HEAD/samples/oauth/oauth_on_appengine/appengine_utilities/event.py   google-data-api(Download)
        for e in self.events:
            if e["event"] == event:
                if type(e["args"]) == type([]):
                    e["callback"](*e["args"])
                elif type(e["args"]) == type({}):

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