/third_party/python/Lib/ |
H A D | _py_abc.py | 36 cls = super().__new__(mcls, name, bases, namespace, **kwargs) 43 value = getattr(cls, name, None) 46 cls.__abstractmethods__ = frozenset(abstracts) 48 cls._abc_registry = WeakSet() 49 cls._abc_cache = WeakSet() 50 cls._abc_negative_cache = WeakSet() 51 cls._abc_negative_cache_version = ABCMeta._abc_invalidation_counter 52 return cls 54 def register(cls, subclass): 61 if issubclass(subclass, cls) [all...] |
H A D | abc.py | 36 def my_abstract_classmethod(cls, ...): 106 cls = super().__new__(mcls, name, bases, namespace, **kwargs) 107 _abc_init(cls) 108 return cls 110 def register(cls, subclass): 115 return _abc_register(cls, subclass) 117 def __instancecheck__(cls, instance): 118 """Override for isinstance(instance, cls).""" 119 return _abc_instancecheck(cls, instance) 121 def __subclasscheck__(cls, subclas [all...] |
H A D | dataclasses.py | 260 def __class_getitem__(cls, type): 271 # When cls._FIELDS is filled in with a list of Field objects, the name 470 # (cls.fieldname=defaultvalue). But that won't work for a 599 def _frozen_get_del_attr(cls, fields, globals): 600 locals = {'cls': cls, 609 (f'if type(self) is cls or name in {fields_str}:', 611 f'super(cls, self).__setattr__(name, value)'), 616 (f'if type(self) is cls or name in {fields_str}:', 618 f'super(cls, sel [all...] |
H A D | enum.py | 482 def __prepare__(metacls, cls, bases, **kwds): 484 metacls._check_for_existing_members_(cls, bases) 487 enum_dict._cls_name = cls 489 member_type, first_enum = metacls._get_mixins_(cls, bases) 496 def __new__(metacls, cls, bases, classdict, *, boundary=None, _simple=False, **kwds): 503 return super().__new__(metacls, cls, bases, classdict, **kwds) 527 member_type, first_enum = metacls._get_mixins_(cls, bases) 546 classdict['_value_repr_'] = metacls._find_data_repr_(cls, bases) 559 enum_class = super().__new__(metacls, cls, bases, classdict, **kwds) 639 Flag is None and cls ! [all...] |
H A D | copyreg.py | 47 def _reconstructor(cls, base, state): 49 obj = object.__new__(cls) 51 obj = base.__new__(cls, state) 63 cls = self.__class__ 64 for base in cls.__mro__: 75 if base is cls: 76 raise TypeError(f"cannot pickle {cls.__name__!r} object") 78 args = (cls, base, state) 83 raise TypeError(f"cannot pickle {cls.__name__!r} object: " 104 def __newobj__(cls, *arg [all...] |
H A D | functools.py | 188 def total_ordering(cls): 191 roots = {op for op in _convert if getattr(cls, op, None) is not getattr(object, op, None)} 198 setattr(cls, opname, opfunc) 199 return cls 283 def __new__(cls, func, /, *args, **keywords): 292 self = super(partial, cls).__new__(cls) 363 # flattening is mandatory in order to place cls/self before all 378 format_string = "{module}.{cls}({func}, {args}, {keywords})" 380 cls [all...] |
/third_party/FreeBSD/sys/kern/ |
H A D | subr_kobj.c | 80 kobj_class_compile_common(kobj_class_t cls, kobj_ops_t ops) in kobj_class_compile_common() argument 88 if (cls->ops) in kobj_class_compile_common() 94 for (i = 0, m = cls->methods; m->desc; i++, m++) { in kobj_class_compile_common() 104 ops->cls = cls; in kobj_class_compile_common() 105 cls->ops = ops; in kobj_class_compile_common() 109 kobj_class_compile(kobj_class_t cls) in kobj_class_compile() argument 129 if (cls->ops) { in kobj_class_compile() 135 kobj_class_compile_common(cls, ops); in kobj_class_compile() 140 kobj_class_compile_static(kobj_class_t cls, kobj_ops_ argument 154 kobj_lookup_method_class(kobj_class_t cls, kobjop_desc_t desc) kobj_lookup_method_class() argument 169 kobj_lookup_method_mi(kobj_class_t cls, kobjop_desc_t desc) kobj_lookup_method_mi() argument 192 kobj_lookup_method(kobj_class_t cls, kobj_method_t **cep, kobjop_desc_t desc) kobj_lookup_method() argument 207 kobj_class_free(kobj_class_t cls) kobj_class_free() argument 238 kobj_create(kobj_class_t cls, struct malloc_type *mtype, int mflags) kobj_create() argument 256 kobj_init_common(kobj_t obj, kobj_class_t cls) kobj_init_common() argument 264 kobj_init(kobj_t obj, kobj_class_t cls) kobj_init() argument 290 kobj_init_static(kobj_t obj, kobj_class_t cls) kobj_init_static() argument 302 kobj_class_t cls = obj->ops->cls; kobj_delete() local [all...] |
/third_party/python/Lib/idlelib/idle_test/ |
H A D | test_editor.py | 15 def setUpClass(cls): 17 cls.root = Tk() 18 cls.root.withdraw() 21 def tearDownClass(cls): 22 cls.root.update_idletasks() 23 for id in cls.root.tk.call('after', 'info'): 24 cls.root.after_cancel(id) 25 cls.root.destroy() 26 del cls.root 104 def setUpClass(cls) [all...] |
H A D | test_help_about.py | 25 def setUpClass(cls): 27 cls.root = Tk() 28 cls.root.withdraw() 29 cls.dialog = About(cls.root, 'About IDLE', _utest=True) 32 def tearDownClass(cls): 33 del cls.dialog 34 cls.root.update_idletasks() 35 cls.root.destroy() 36 del cls [all...] |
H A D | test_config_key.py | 30 def setUpClass(cls): 32 cls.root = Tk() 33 cls.root.withdraw() 35 cls.dialog = cls.Validator(cls.root, '<<Test>>', keylist) 38 def tearDownClass(cls): 39 del cls.dialog 40 cls.root.update_idletasks() 41 cls [all...] |
H A D | test_autocomplete_w.py | 13 def setUpClass(cls): 15 cls.root = Tk() 16 cls.root.withdraw() 17 cls.text = Text(cls.root) 18 cls.acw = acw.AutoCompleteWindow(cls.text, tags=None) 21 def tearDownClass(cls): 22 del cls.text, cls [all...] |
H A D | test_calltip_w.py | 12 def setUpClass(cls): 14 cls.root = Tk() 15 cls.root.withdraw() 16 cls.text = Text(cls.root) 17 cls.calltip = calltip_w.CalltipWindow(cls.text) 20 def tearDownClass(cls): 21 cls.root.update_idletasks() 22 cls [all...] |
H A D | test_editmenu.py | 18 def setUpClass(cls): 19 cls.root = root = tk.Tk() 20 cls.root.withdraw() 22 cls.text = tk.Text(root) 23 cls.entry = tk.Entry(root) 24 cls.tentry = ttk.Entry(root) 25 cls.spin = tk.Spinbox(root) 30 def tearDownClass(cls): 31 del cls.text, cls [all...] |
H A D | test_zoomheight.py | 14 def setUpClass(cls): 16 cls.root = Tk() 17 cls.root.withdraw() 18 cls.editwin = EditorWindow(root=cls.root) 21 def tearDownClass(cls): 22 cls.editwin._close() 23 cls.root.update_idletasks() 24 for id in cls.root.tk.call('after', 'info'): 25 cls [all...] |
H A D | test_macosx.py | 28 def setUpClass(cls): 30 cls.root = tk.Tk() 31 cls.root.withdraw() 32 cls.orig_platform = macosx.platform 35 def tearDownClass(cls): 36 cls.root.update_idletasks() 37 cls.root.destroy() 38 del cls.root 39 macosx.platform = cls.orig_platform 83 def setUpClass(cls) [all...] |
H A D | test_format.py | 54 def setUpClass(cls): 56 cls.text = Text() 272 def setUpClass(cls): 274 cls.root = Tk() 275 cls.root.withdraw() 276 editor = Editor(root=cls.root) 277 cls.text = editor.text.text # Test code does not need the wrapper. 278 cls.formatter = ft.FormatParagraph(editor).format_paragraph_event 282 def tearDownClass(cls): 283 del cls [all...] |
H A D | test_redirector.py | 13 def setUpClass(cls): 15 cls.root = Tk() 16 cls.root.withdraw() 17 cls.text = Text(cls.root) 20 def tearDownClass(cls): 21 del cls.text 22 cls.root.destroy() 23 del cls.root 43 def setUpClass(cls) [all...] |
H A D | test_iomenu.py | 21 def setUpClass(cls): 23 cls.root = Tk() 24 cls.root.withdraw() 25 cls.editwin = EditorWindow(root=cls.root) 26 cls.io = iomenu.IOBinding(cls.editwin) 29 def tearDownClass(cls): 30 cls.io.close() 31 cls [all...] |
/third_party/protobuf/python/google/protobuf/internal/ |
H A D | python_message.py | 107 def __new__(cls, name, bases, dictionary): 156 superclass = super(GeneratedProtocolMessageType, cls) 157 new_class = superclass.__new__(cls, name, bases, dictionary) 160 def __init__(cls, name, bases, dictionary): 183 assert existing_class is cls, ( 188 cls._decoders_by_tag = {} 191 cls._decoders_by_tag[decoder.MESSAGE_SET_ITEM_TAG] = ( 196 _AttachFieldHelpers(cls, field) 198 descriptor._concrete_class = cls # pylint: disable=protected-access 199 _AddEnumValues(descriptor, cls) [all...] |
/third_party/mbedtls/scripts/mbedtls_dev/ |
H A D | bignum_common.py | 224 def get_value_pairs(cls) -> Iterator[Tuple[str, str]]: 230 if cls.arity == 1: 231 yield from ((a, "0") for a in cls.input_values) 232 elif cls.arity == 2: 233 if cls.unique_combinations_only: 234 yield from combination_pairs(cls.input_values) 238 for a in cls.input_values 239 for b in cls.input_values 245 def generate_function_tests(cls) -> Iterator[test_case.TestCase]: 246 if cls [all...] |
/third_party/python/Lib/test/ |
H A D | test_subclassinit.py | 10 def __init_subclass__(cls): 12 cls.initialized = True 24 def __init_subclass__(cls): 26 cls.initialized = True 36 def __init_subclass__(cls, **kwargs): 37 cls.kwargs = kwargs 46 def __init_subclass__(cls): 55 def __init_subclass__(cls, whatever): 64 def __init_subclass__(cls, **kwargs): 66 cls [all...] |
H A D | test_datetime.py | 28 for name, cls in module.__dict__.items(): 29 if not isinstance(cls, type): 31 if issubclass(cls, unittest.TestCase): 32 test_classes.append(cls) 33 elif issubclass(cls, unittest.TestSuite): 34 suit = cls() 36 test_classes = sorted(set(test_classes), key=lambda cls: cls.__qualname__) 37 for cls in test_classes: 38 cls [all...] |
/third_party/protobuf/python/google/protobuf/ |
H A D | service_reflection.py | 70 def __init__(cls, name, bases, dictionary): 92 service_builder.BuildService(cls) 93 cls.DESCRIPTOR = descriptor 106 def __init__(cls, name, bases, dictionary): 116 descriptor = dictionary.get(cls._DESCRIPTOR_KEY) 120 super(GeneratedServiceStubType, cls).__init__(name, bases, dictionary) 127 service_stub_builder.BuildServiceStub(cls) 149 def BuildService(self, cls): 153 cls: The class that will be constructed. 163 self.cls [all...] |
/third_party/python/Lib/json/ |
H A D | __init__.py | 121 allow_nan=True, cls=None, indent=None, separators=None, 161 the ``cls`` kwarg; otherwise ``JSONEncoder`` is used. 167 cls is None and indent is None and separators is None and 171 if cls is None: 172 cls = JSONEncoder 173 iterable = cls(skipkeys=skipkeys, ensure_ascii=ensure_ascii, 184 allow_nan=True, cls=None, indent=None, separators=None, 223 the ``cls`` kwarg; otherwise ``JSONEncoder`` is used. 229 cls is None and indent is None and separators is None and 232 if cls i [all...] |
/third_party/python/Tools/c-analyzer/c_parser/ |
H A D | info.py | 35 def _from_raw(cls, raw): 38 elif isinstance(raw, cls): 41 # We could use cls[raw] for the upper-case form, 43 return cls(raw.lower()) 48 def by_priority(cls, group=None): 50 return cls._ALL_BY_PRIORITY.copy() 52 return cls._TYPE_DECLS_BY_PRIORITY.copy() 54 return cls._ALL_DECLS_BY_PRIORITY.copy() 62 def is_type_decl(cls, kind): 63 if kind in cls [all...] |