Home
last modified time | relevance | path

Searched refs:cls (Results 1 – 25 of 116) sorted by relevance

12345

/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Lib/
Dabc.py87 cls = super(ABCMeta, mcls).__new__(mcls, name, bases, namespace)
94 value = getattr(cls, name, None)
97 cls.__abstractmethods__ = frozenset(abstracts)
99 cls._abc_registry = WeakSet()
100 cls._abc_cache = WeakSet()
101 cls._abc_negative_cache = WeakSet()
102 cls._abc_negative_cache_version = ABCMeta._abc_invalidation_counter
103 return cls
105 def register(cls, subclass): argument
109 if issubclass(subclass, cls):
[all …]
Dcopy_reg.py46 def _reconstructor(cls, base, state): argument
48 obj = object.__new__(cls)
50 obj = base.__new__(cls, state)
92 def __newobj__(cls, *args): argument
93 return cls.__new__(cls, *args)
95 def _slotnames(cls): argument
107 names = cls.__dict__.get("__slotnames__")
113 if not hasattr(cls, "__slots__"):
118 for c in cls.__mro__:
136 cls.__slotnames__ = names
D_abcoll.py40 def __subclasshook__(cls, C): argument
41 if cls is Hashable:
64 def __subclasshook__(cls, C): argument
65 if cls is Iterable:
84 def __subclasshook__(cls, C): argument
85 if cls is Iterator:
99 def __subclasshook__(cls, C): argument
100 if cls is Sized:
114 def __subclasshook__(cls, C): argument
115 if cls is Container:
[all …]
Dfunctools.py53 def total_ordering(cls): argument
69 roots = set(dir(cls)) & set(convert)
77 setattr(cls, opname, opfunc)
78 return cls
Dcopy.py72 cls = type(x)
74 copier = _copy_dispatch.get(cls)
78 copier = getattr(cls, "__copy__", None)
82 reductor = dispatch_table.get(cls)
94 raise Error("un(shallow)copyable object of type %s" % cls)
159 cls = type(x)
161 copier = _deepcopy_dispatch.get(cls)
166 issc = issubclass(cls, type)
176 reductor = dispatch_table.get(cls)
189 "un(deep)copyable object of type %s" % cls)
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/
Dabc.py87 cls = super(ABCMeta, mcls).__new__(mcls, name, bases, namespace)
94 value = getattr(cls, name, None)
97 cls.__abstractmethods__ = frozenset(abstracts)
99 cls._abc_registry = WeakSet()
100 cls._abc_cache = WeakSet()
101 cls._abc_negative_cache = WeakSet()
102 cls._abc_negative_cache_version = ABCMeta._abc_invalidation_counter
103 return cls
105 def register(cls, subclass): argument
109 if issubclass(subclass, cls):
[all …]
Dcopy_reg.py46 def _reconstructor(cls, base, state): argument
48 obj = object.__new__(cls)
50 obj = base.__new__(cls, state)
92 def __newobj__(cls, *args): argument
93 return cls.__new__(cls, *args)
95 def _slotnames(cls): argument
107 names = cls.__dict__.get("__slotnames__")
113 if not hasattr(cls, "__slots__"):
118 for c in cls.__mro__:
136 cls.__slotnames__ = names
D_abcoll.py40 def __subclasshook__(cls, C): argument
41 if cls is Hashable:
64 def __subclasshook__(cls, C): argument
65 if cls is Iterable:
83 def __subclasshook__(cls, C): argument
84 if cls is Iterator:
98 def __subclasshook__(cls, C): argument
99 if cls is Sized:
113 def __subclasshook__(cls, C): argument
114 if cls is Container:
[all …]
Dfractions.py68 def __new__(cls, numerator=0, denominator=None): argument
99 self = super(Fraction, cls).__new__(cls)
169 def from_float(cls, f): argument
176 return cls(f)
179 (cls.__name__, f, type(f).__name__))
181 raise TypeError("Cannot convert %r to %s." % (f, cls.__name__))
182 return cls(*f.as_integer_ratio())
185 def from_decimal(cls, dec): argument
193 (cls.__name__, dec, type(dec).__name__))
196 raise TypeError("Cannot convert %s to %s." % (dec, cls.__name__))
[all …]
Dfunctools.py53 def total_ordering(cls): argument
69 roots = set(dir(cls)) & set(convert)
77 setattr(cls, opname, opfunc)
78 return cls
Dcopy.py72 cls = type(x)
74 copier = _copy_dispatch.get(cls)
78 copier = getattr(cls, "__copy__", None)
82 reductor = dispatch_table.get(cls)
94 raise Error("un(shallow)copyable object of type %s" % cls)
159 cls = type(x)
161 copier = _deepcopy_dispatch.get(cls)
166 issc = issubclass(cls, type)
176 reductor = dispatch_table.get(cls)
189 "un(deep)copyable object of type %s" % cls)
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/json/
D__init__.py123 allow_nan=True, cls=None, indent=None, separators=None, argument
169 cls is None and indent is None and separators is None and
173 if cls is None:
174 cls = JSONEncoder
175 iterable = cls(skipkeys=skipkeys, ensure_ascii=ensure_ascii,
186 allow_nan=True, cls=None, indent=None, separators=None, argument
229 cls is None and indent is None and separators is None and
232 if cls is None:
233 cls = JSONEncoder
234 return cls(
[all …]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Lib/json/
D__init__.py123 allow_nan=True, cls=None, indent=None, separators=None, argument
177 cls is None and indent is None and separators is None and
181 if cls is None:
182 cls = JSONEncoder
183 iterable = cls(skipkeys=skipkeys, ensure_ascii=ensure_ascii,
194 allow_nan=True, cls=None, indent=None, separators=None, argument
241 cls is None and indent is None and separators is None and
244 if cls is None:
245 cls = JSONEncoder
246 return cls(
[all …]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Demo/newmetaclasses/
DEnum.py20 def __init__(cls, name, bases, dict): argument
21 super(EnumMetaclass, cls).__init__(name, bases, dict)
22 cls._members = []
26 setattr(cls, attr, enumval)
27 cls._members.append(attr)
29 def __getattr__(cls, name): argument
31 return cls._members
34 def __repr__(cls): argument
36 enumbases = [base.__name__ for base in cls.__bases__
40 enumvalues = ["%s: %d" % (val, getattr(cls, val))
[all …]
/device/linaro/bootloader/edk2/BaseTools/Source/Python/Common/
DMultipleWorkspace.py42 def convertPackagePath(cls, Ws, Path): argument
56 def setWs(cls, Ws, PackagesPath=None): argument
57 cls.WORKSPACE = Ws
59cls.PACKAGES_PATH = [cls.convertPackagePath (Ws, os.path.normpath(Path.strip())) for Path in Packa…
61 cls.PACKAGES_PATH = []
73 def join(cls, Ws, *p): argument
76 for Pkg in cls.PACKAGES_PATH:
93 def relpath(cls, Path, Ws): argument
94 for Pkg in cls.PACKAGES_PATH:
112 def getWs(cls, Ws, Path): argument
[all …]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/
Dsetuptools_extension.py4 def _get_unpatched(cls): argument
10 while cls.__module__.startswith('setuptools'):
11 cls, = cls.__bases__
12 if not cls.__module__.startswith('distutils'):
14 "distutils has already been patched by %r" % cls
16 return cls
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/test/
Dtest_setups.py37 def setUpClass(cls): argument
55 def tearDownClass(cls): argument
73 def tearDownClass(cls): argument
84 def tearDownClass(cls): argument
102 def setUpClass(cls): argument
121 def tearDownClass(cls): argument
132 def tearDownClass(cls): argument
154 def setUpClass(cls): argument
157 def tearDownClass(cls): argument
171 def setUpClass(cls): argument
[all …]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/test/
Dtest_profile.py21 def do_profiling(cls): argument
23 prof = cls.profilerclass(timer, 0.001)
27 for methodname in cls.methodnames:
63 def regenerate_expected_output(filename, cls): argument
66 results = cls.do_profiling()
77 for i, method in enumerate(cls.methodnames):
79 cls.__name__, method, results[i+1]))
Dtest_typechecks.py9 def __instancecheck__(cls, inst): argument
11 return any(cls.__subclasscheck__(c)
14 def __subclasscheck__(cls, sub): argument
16 candidates = cls.__dict__.get("__subclass__", set()) | set([cls])
79 def __subclasscheck__(self, cls): argument
Dtest_threading_local.py118 for cls in (local, py_local):
119 class MyLocal(cls):
125 self.assertRaises(TypeError, cls, a=1)
126 self.assertRaises(TypeError, cls, 1)
172 def _test_dict_attribute(self, cls): argument
173 obj = cls()
Dtest_datetime.py1060 cls = self.theclass
1061 self.assertEqual(cls(1900, 1, 1).strftime("%Y"), "1900")
1063 self.assertRaises(ValueError, cls(y, 1, 1).strftime, "%Y")
1066 cls = self.theclass
1068 base = cls(*args)
1077 expected = cls(*newargs)
1083 base = cls(2000, 2, 29)
1091 def __new__(cls, *args, **kws): argument
1094 result = self.theclass.__new__(cls, *args, **temp)
1611 cls = self.theclass
[all …]
/device/sample/frameworks/PlatformLibrary/jni/
DPlatformLibrary.cpp53 if (jclass cls = env->FindClass(ex)) { in throwException() local
57 env->ThrowNew(cls, msg); in throwException()
59 env->ThrowNew(cls, NULL); in throwException()
68 env->DeleteLocalRef(cls); in throwException()
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Objects/
Dabstract.c2792 abstract_get_bases(PyObject *cls) argument
2802 bases = PyObject_GetAttr(cls, __bases__);
2817 abstract_issubclass(PyObject *derived, PyObject *cls) argument
2824 if (derived == cls)
2844 r = abstract_issubclass(PyTuple_GET_ITEM(bases, i), cls);
2854 check_class(PyObject *cls, const char *error) argument
2856 PyObject *bases = abstract_get_bases(cls);
2868 recursive_isinstance(PyObject *inst, PyObject *cls) argument
2880 if (PyClass_Check(cls) && PyInstance_Check(inst)) {
2883 retval = PyClass_IsSubclass(inclass, cls);
[all …]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Objects/
Dabstract.c2796 abstract_get_bases(PyObject *cls) argument
2806 bases = PyObject_GetAttr(cls, __bases__);
2821 abstract_issubclass(PyObject *derived, PyObject *cls) argument
2828 if (derived == cls)
2848 r = abstract_issubclass(PyTuple_GET_ITEM(bases, i), cls);
2858 check_class(PyObject *cls, const char *error) argument
2860 PyObject *bases = abstract_get_bases(cls);
2872 recursive_isinstance(PyObject *inst, PyObject *cls) argument
2884 if (PyClass_Check(cls) && PyInstance_Check(inst)) {
2887 retval = PyClass_IsSubclass(inclass, cls);
[all …]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Demo/classes/
DVec.py29 def fromlist(cls, v): argument
32 inst = cls()

12345