Home
last modified time | relevance | path

Searched refs:__class__ (Results 1 – 25 of 389) sorted by relevance

12345678910>>...16

/third_party/python/Lib/test/
Dtest_super.py47 nonlocal __class__
48 __class__ = TestSuper
92 __class__ = 413 variable in TestSuper.test_various___class___pathologies.X
95 self.assertEqual(x.__class__, 413)
97 x = __class__
99 __class__
108 global __class__
109 __class__ = 42 variable in TestSuper.test_various___class___pathologies.X
111 __class__
116 nonlocal __class__
[all …]
Dtest_property.py107 self.assertEqual(sub.__class__.spam.__doc__, "SubClass.getter")
113 self.assertEqual(base.__class__.spam.__doc__, "BaseClass.getter")
118 self.assertEqual(base.__class__.spam.__doc__, "spam spam spam")
119 self.assertEqual(sub.__class__.spam.__doc__, "spam spam spam")
126 self.assertEqual(newgettersub.__class__.spam.__doc__, "new docstring")
129 self.assertEqual(newgetter.__class__.spam.__doc__, "new docstring")
173 self.assertEqual(sub.__class__.spam.__doc__, 'Eggs')
174 sub.__class__.spam.__doc__ = 'Spam'
175 self.assertEqual(sub.__class__.spam.__doc__, 'Spam')
Dtest_descr.py414 self.assertIs(d.__class__, dict)
493 self.assertEqual(d.__class__, D)
1022 self.assertEqual(a.__class__, object)
1048 self.assertTrue(m.__class__ is types.ModuleType)
1051 m.__class__ = SubType
1052 self.assertTrue(m.__class__ is SubType)
1055 m.__class__ = types.ModuleType
1056 self.assertTrue(m.__class__ is types.ModuleType)
1072 (1).__class__ = MyInt
1077 (1.0).__class__ = MyFloat
[all …]
Dtest_dynamicclassattribute.py124 self.assertEqual(sub.__class__.__dict__['spam'].__doc__, "SubClass.getter")
130 self.assertEqual(base.__class__.__dict__['spam'].__doc__, "BaseClass.getter")
135 self.assertEqual(base.__class__.__dict__['spam'].__doc__, "spam spam spam")
136 self.assertEqual(sub.__class__.__dict__['spam'].__doc__, "spam spam spam")
143 self.assertEqual(newgettersub.__class__.__dict__['spam'].__doc__, "new docstring")
146 self.assertEqual(newgetter.__class__.__dict__['spam'].__doc__, "new docstring")
Dtest_baseexception.py19 (ins.__class__.__name__, attr))
96 [repr(exc), '%s(%r)' % (exc.__class__.__name__, arg)])
106 [repr(exc), exc.__class__.__name__ + repr(exc.args)])
114 [repr(exc), exc.__class__.__name__ + '()'])
/third_party/python/Lib/collections/
D__init__.py261 return '%s()' % (self.__class__.__name__,)
262 return '%s(%r)' % (self.__class__.__name__, list(self.items()))
269 return self.__class__, (), inst_dict or None, None, iter(self.items())
273 return self.__class__(self)
300 new = self.__class__(self)
307 new = self.__class__(other)
441 return self.__class__.__name__ + repr_fmt % self
703 return self.__class__(self)
706 return self.__class__, (dict(self),)
1013 return self.__class__(self.maps[0].copy(), *self.maps[1:])
[all …]
/third_party/skia/third_party/externals/markupsafe/
D__init__.py80 return self.__class__(super(Markup, self).__add__(self.escape(other)))
90 return self.__class__(text_type.__mul__(self, num))
99 return self.__class__(text_type.__mod__(self, arg))
103 self.__class__.__name__,
108 return self.__class__(text_type.join(self, map(self.escape, seq)))
112 return list(map(self.__class__, text_type.split(self, *args, **kwargs)))
116 return list(map(self.__class__, text_type.rsplit(self, *args, **kwargs)))
120 return list(map(self.__class__, text_type.splitlines(self, *args, **kwargs)))
163 if rv.__class__ is not cls:
172 return self.__class__(orig(self, *args, **kwargs))
[all …]
/third_party/node/tools/inspector_protocol/markupsafe/
D__init__.py80 return self.__class__(super(Markup, self).__add__(self.escape(other)))
90 return self.__class__(text_type.__mul__(self, num))
99 return self.__class__(text_type.__mod__(self, arg))
103 self.__class__.__name__,
108 return self.__class__(text_type.join(self, map(self.escape, seq)))
112 return list(map(self.__class__, text_type.split(self, *args, **kwargs)))
116 return list(map(self.__class__, text_type.rsplit(self, *args, **kwargs)))
120 return list(map(self.__class__, text_type.splitlines(self, *args, **kwargs)))
163 if rv.__class__ is not cls:
172 return self.__class__(orig(self, *args, **kwargs))
[all …]
/third_party/python/Lib/
Denum.py407 type(obj).__qualname__, cls.__class__.__qualname__))
495 metacls = cls.__class__
747 self.__class__.__name__, self._name_, self._value_)
750 return "%s.%s" % (self.__class__.__name__, self._name_)
758 for cls in self.__class__.mro()
787 return self.__class__, (self._value_, )
875 if not isinstance(other, self.__class__):
878 type(other).__qualname__, self.__class__.__qualname__))
882 cls = self.__class__
893 cls = self.__class__
[all …]
Doperator.py258 return '%s.%s(%s)' % (self.__class__.__module__,
259 self.__class__.__qualname__,
263 return self.__class__, self._attrs
289 return '%s.%s(%s)' % (self.__class__.__module__,
290 self.__class__.__name__,
294 return self.__class__, self._items
319 return '%s.%s(%s)' % (self.__class__.__module__,
320 self.__class__.__name__,
325 return self.__class__, (self._name,) + self._args
328 return partial(self.__class__, self._name, **self._kwargs), self._args
D_weakrefset.py83 return (self.__class__, (list(self),),
97 return self.__class__(self)
149 return self.__class__(item for item in other if item in self)
175 if not isinstance(other, self.__class__):
197 return self.__class__(e for s in (self, other) for e in s)
Dtypes.py216 self.__isgen = gen.__class__ is GeneratorType
255 if (func.__class__ is FunctionType and
256 getattr(func, '__code__', None).__class__ is CodeType):
284 if (coro.__class__ is CoroutineType or
285 coro.__class__ is GeneratorType and coro.gi_code.co_flags & 0x100):
/third_party/markupsafe/
D__init__.py26 return self.__class__(orig(self, *args, **kwargs))
85 return self.__class__(super().__add__(self.escape(other)))
97 return self.__class__(super().__mul__(num))
109 return self.__class__(super().__mod__(arg))
115 return self.__class__(super().join(map(self.escape, seq)))
122 return [self.__class__(v) for v in super().split(sep, maxsplit)]
129 return [self.__class__(v) for v in super().rsplit(sep, maxsplit)]
134 return [self.__class__(v) for v in super().splitlines(keepends)]
166 if rv.__class__ is not cls:
195 cls = self.__class__
[all …]
/third_party/mindspore/mindspore/dataset/callback/
Dds_callback.py98 if self.__class__.ds_begin != DSCallback.ds_begin:
102 if self.__class__.ds_epoch_begin != DSCallback.ds_epoch_begin:
105 if self.__class__.ds_epoch_end != DSCallback.ds_epoch_end:
109 if self.__class__.ds_step_begin != DSCallback.ds_step_begin:
112 if self.__class__.ds_step_end != DSCallback.ds_step_end:
235 if self.__class__.sync_step_begin != WaitedDSCallback.sync_step_begin:
239 if self.__class__.sync_epoch_begin != WaitedDSCallback.sync_epoch_begin:
/third_party/PyYAML/tests/lib/
Dtest_errors.py10 print("%s:" % exc.__class__.__name__, exc)
22 print("%s:" % exc.__class__.__name__, exc)
34 print("%s:" % exc.__class__.__name__, exc)
47 print("%s:" % exc.__class__.__name__, exc)
62 print("%s:" % exc.__class__.__name__, exc)
Dtest_constructor.py34 return self.__class__, self.__dict__ == other.__class__, other.__dict__
93 return self.__class__, self.__dict__ == other.__class__, other.__dict__
113 return self.__class__, self.__dict__ == other.__class__, other.__dict__
181 return self.__class__, (self.foo, self.bar, self.baz)
185 return self.__class__, (self.foo, self.bar), self.baz
293 print("%s:" % exc.__class__.__name__, exc)
/third_party/mindspore/mindspore/nn/layer/
Dcontainer.py36 if issubclass(cell.__class__, Cell):
169 return self.__class__(
171 index = _valid_index(len(self), index, self.__class__.__name__)
175 cls_name = self.__class__.__name__
185 cls_name = self.__class__.__name__
237 if _valid_cell(cell, self.__class__.__name__):
292 cls_name = self.__class__.__name__
294 return self.__class__(list(self._cells.values())[index])
302 cls_name = self.__class__.__name__
313 cls_name = self.__class__.__name__
[all …]
/third_party/node/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/
Dxcodeproj_file.py300 return '<%s at 0x%x>' % (self.__class__.__name__, id(self))
301 return '<%s %r at 0x%x>' % (self.__class__.__name__, name, id(self))
313 that = self.__class__(id=self.id, parent=self.parent)
341 self.__class__.__name__)
345 raise TypeError('Unexpected type ' + value.__class__.__name__ + \
346 ' for key ' + key + ' in ' + self.__class__.__name__)
365 raise NotImplementedError(self.__class__.__name__ + ' must implement Name')
380 hashables = [self.__class__.__name__]
628 raise TypeError("Can't make " + value.__class__.__name__ + ' printable')
726 self._XCKVPrint(file, 3, 'isa', self.__class__.__name__)
[all …]
/third_party/python/Tools/peg_generator/pegen/
Dast_dump.py19 if any(cls.__name__ == "AST" for cls in node.__class__.__mro__):
51 return "%s(%s)" % (node.__class__.__name__, ", ".join(args)), not args
52 return "%s(%s%s)" % (node.__class__.__name__, prefix, sep.join(args)), False
59 if all(cls.__name__ != "AST" for cls in node.__class__.__mro__):
60 raise TypeError("expected AST, got %r" % node.__class__.__name__)
/third_party/node/tools/gyp/pylib/gyp/
Dxcodeproj_file.py304 return "<%s at 0x%x>" % (self.__class__.__name__, id(self))
305 return "<%s %r at 0x%x>" % (self.__class__.__name__, name, id(self))
317 that = self.__class__(id=self.id, parent=self.parent)
345 "Strong dict for key " + key + " in " + self.__class__.__name__
352 + value.__class__.__name__
356 + self.__class__.__name__
377 raise NotImplementedError(self.__class__.__name__ + " must implement Name")
392 hashables = [self.__class__.__name__]
652 raise TypeError("Can't make " + value.__class__.__name__ + " printable")
751 self._XCKVPrint(file, 3, "isa", self.__class__.__name__)
[all …]
/third_party/python/Lib/email/
D_policybase.py53 name, self.__class__.__name__))
58 return "{}({})".format(self.__class__.__name__, ', '.join(args))
67 newpolicy = self.__class__.__new__(self.__class__)
74 attr, self.__class__.__name__))
83 raise AttributeError(msg.format(self.__class__.__name__, name))
/third_party/python/Lib/unittest/
Dsuite.py27 return "<%s tests=%s>" % (util.strclass(self.__class__), list(self))
30 if not isinstance(other, self.__class__):
115 result._previousTestClass = test.__class__
117 if (getattr(test.__class__, '_classSetupFailed', False) or
144 currentClass = test.__class__
198 currentModule = test.__class__.__module__
287 currentClass = test.__class__
/third_party/mindspore/mindspore/explainer/
D_image_classification_runner.py213 if explainer.__class__ in explainer_classes:
220 explainer_classes.append(explainer.__class__)
224 if benchmarker.__class__ in benchmarker_classes:
230 benchmarker_classes.append(benchmarker.__class__)
511 exp_names = [exp.__class__.__name__ for exp in self._explainers]
514 bench_names = [bench.__class__.__name__ for bench in self._benchmarkers]
627 idx, explainer.__class__.__name__))
631 idx, explainer.__class__.__name__, time() - now))
640 idx, bench.__class__.__name__, explainer.__class__.__name__))
644 idx, bench.__class__.__name__, explainer.__class__.__name__, time() - now))
[all …]
/third_party/mindspore/mindspore/ops/
Dprimitive.py55 if hasattr(self.__class__, '__mindspore_signature__'):
56 out = self._fill_signature(self.__class__.__mindspore_signature__)
597 class_name = self.__class__.__name__
598 if hasattr(self.__class__, "substitute_name"):
599 class_name = self.__class__.substitute_name
605 Primitive.__init__(self, self.__class__.__name__)
/third_party/python/Lib/distutils/
Dcmd.py58 if self.__class__ is Command:
134 % self.__class__)
148 % self.__class__)
176 % self.__class__)
269 return self.__class__.__name__

12345678910>>...16