/third_party/python/Lib/test/ |
H A D | test_super.py | 147 # Ensure zero-arg super() works as soon as type.__new__() is completed 151 def __new__(cls, name, bases, namespace): member in TestSuper.test___class___new.Meta 153 self = super().__new__(cls, name, bases, namespace) 169 def __new__(cls, name, bases, namespace): member in TestSuper.test___class___delayed.Meta 204 def __new__(cls, name, bases, namespace): member in TestSuper.test___classcell___expected_behaviour.Meta 207 return super().__new__(cls, name, bases, namespace) 218 # type.__new__ 234 # Some metaclasses may not pass the original namespace to type.__new__ 237 def __new__(cls, name, bases, namespace): member in TestSuper.test___classcell___missing.Meta 239 return super().__new__(cl 259 def __new__(cls, name, bases, namespace, cell): global() member in TestSuper.test___classcell___overwrite.Meta 273 def __new__(cls, name, bases, namespace): global() member in TestSuper.test___classcell___wrong_cell.Meta [all...] |
H A D | test_subclassinit.py | 117 def __new__(cls, name, bases, ns): member in Test.test_set_name_metaclass.Meta 118 ret = super().__new__(cls, name, bases, ns) 181 def __new__(cls, name, bases, ns): member in Test.test_set_name_init_subclass.Meta 182 self = super().__new__(cls, name, bases, ns) 239 def __new__(cls, name, bases, namespace, otherarg): member in Test.test_errors.MyMeta 240 return super().__new__(cls, name, bases, namespace) 254 def __new__(cls, name, bases, namespace): member in Test.test_errors_changed_pep487.MyMeta 255 return super().__new__(cls, name=name, bases=bases, 263 def __new__(cls, name, bases, namespace, otherarg): member in Test.test_errors_changed_pep487.MyMeta 264 self = super().__new__(cl [all...] |
H A D | test_class.py | 670 C.__new__(C, 42) 676 object.__new__(C, 42) 681 # Class with both `__init__` & `__new__` method overridden 683 def __new__(cls, *args, **kwargs): member in ClassTests.testConstructorErrorMessages.D 684 super().__new__(cls, *args, **kwargs) 688 error_msg = r'object.__new__\(\) takes exactly one argument \(the type to instantiate\)' 694 D.__new__(D, 42) 697 object.__new__(D, 42) 717 def __new__(cls, name, bases, attrs, **kwargs): member in ClassTests.testClassWithExtCall.Meta
|
H A D | ann_module.py | 44 def __new__(meta, name, bases, namespace): member in Meta 45 return super().__new__(meta, name, bases, namespace)
|
H A D | test_descr.py | 271 def __new__(cls, *args, **kwds): member in OperatorsTest.test_complexes.Number 272 result = complex.__new__(cls, *args) 496 def __new__(cls, name, bases, dict): member in ClassPropertiesAndMethods.test_metaclass.M1 498 return type.__new__(cls, name, bases, dict) 509 def __new__(cls, name, bases, dict): member in ClassPropertiesAndMethods.test_metaclass.M2 510 self = object.__new__(cls) 537 def __new__(metaclass, name, bases, dict): member in ClassPropertiesAndMethods.test_metaclass.autosuper 538 cls = super(autosuper, metaclass).__new__(metaclass, 570 def __new__(metaclass, name, bases, dict): member in ClassPropertiesAndMethods.test_metaclass.autoproperty 585 return super(autoproperty, metaclass).__new__(metaclas 636 def __new__(*args, **kwargs): global() member in ClassPropertiesAndMethods.test_metaclass.A 654 def __new__(mcls, name, bases, ns): global() member in ClassPropertiesAndMethods.test_metaclass.AMeta 663 def __new__(mcls, name, bases, ns): global() member in ClassPropertiesAndMethods.test_metaclass.BMeta 730 def __new__(mcls, *args, **kwargs): global() member in ClassPropertiesAndMethods.test_metaclass.ANotMeta 738 def __new__(mcls, *args, **kwargs): global() member in ClassPropertiesAndMethods.test_metaclass.BNotMeta 1363 def __new__(cls, name, bases, namespace, attr): global() member in .test_slots_special2.Meta 1767 def __new__(cls): global() member in .test_newslots.C 1789 __new__ = list.__new__ global() variable in .test_bad_new.C 1792 __new__ = object.__new__ global() variable in .test_bad_new.C 1812 def __new__(cls, foo): global() member in .test_object_new.A 1820 def __new__(cls, foo): global() member in .test_object_new.A 1832 def __new__(cls, *args, **kwargs): global() member in .test_restored_object_new.A 1836 __new__ = object.__new__ global() variable in .test_restored_object_new.B 3733 def __new__(cls, arg): global() member in .test_funny_new.C 3753 def __new__(*args): global() member in .test_funny_new.C 3762 def __new__(*args): global() member in .test_funny_new.C 4126 def __new__(self, name, bases, ns): global() member in .test_mutable_bases_with_failing_mro.WorkOnce 4893 def __new__(cls, foo, kw=0, *args, **kwds): global() member in .test_object_new_and_init_with_parameters.OverrideNew 4979 def __new__(cls): global() member in .test_bpo25750.X 5434 def __new__(cls, a, b): global() member in PicklingTests.test_reduce_copying.C2 5476 def __new__(cls, a, b, value): global() member in PicklingTests.test_reduce_copying.C4 5493 def __new__(cls, a, b, *, value=0): global() member in PicklingTests.test_reduce_copying.C5 5600 def __new__(mcls, name, bases, attrs): global() member in DebugHelperMeta [all...] |
H A D | test_copy.py | 44 def __new__(cls, foo): member in TestCopy.test_copy_registry.C 45 obj = object.__new__(cls) 197 def __new__(cls, foo): member in TestCopy.test_copy_inst_getnewargs.C 198 self = int.__new__(cls) 214 def __new__(cls, *, foo): member in TestCopy.test_copy_inst_getnewargs_ex.C 215 self = int.__new__(cls) 309 def __new__(cls, foo): member in TestCopy.test_deepcopy_registry.C 310 obj = object.__new__(cls) 496 def __new__(cls, foo): member in TestCopy.test_deepcopy_inst_getnewargs.C 497 self = int.__new__(cl 514 def __new__(cls, *, foo): global() member in TestCopy.test_deepcopy_inst_getnewargs_ex.C [all...] |
H A D | test_enum.py | 435 def __new__(cls, *value, **kwds): member in _EnumTests.test_dir_on_sub_with_behavior_including_instance_dict_on_super.SuperEnum 436 new = self.enum_type._member_type_.__new__ 1177 def __new__(cls, value): member in TestSpecial.test_inherited_data_type.UnBrokenInt 1178 return int.__new__(cls, value) 1545 def __new__(metacls, cls, bases, classdict): member in TestSpecial.test_multiple_mixin_mro.auto_enum 1561 return super(auto_enum, metacls).__new__( 1583 def __new__(cls, *args): member in TestSpecial.test_subclasses_with_getnewargs.NamedInt 1588 self = int.__new__(cls, *args) 1629 self.assertIs(NEI.__new__, Enum.__new__) 1643 def __new__(cls, *args): global() member in TestSpecial.test_subclasses_with_getnewargs_ex.NamedInt 1703 def __new__(cls, *args): global() member in TestSpecial.test_subclasses_with_reduce.NamedInt 1763 def __new__(cls, *args): global() member in TestSpecial.test_subclasses_with_reduce_ex.NamedInt 1822 def __new__(cls, *args): global() member in TestSpecial.test_subclasses_without_direct_pickle_support.NamedInt 1877 def __new__(cls, *args): global() member in TestSpecial.test_subclasses_with_direct_pickle_support.NamedInt 1949 def __new__(cls): global() member in TestSpecial.test_duplicate_values_give_unique_enum_items.AutoNumber 1966 def __new__(cls): global() member in TestSpecial.test_inherited_new_from_enhanced_enum.AutoNumber 1982 def __new__(cls): global() member in TestSpecial.test_inherited_new_from_mixed_enum.AutoNumber 2133 def __new__(cls, value, period): global() member in TestSpecial.test_ignore.Period 2158 def __new__(cls): global() member in TestSpecial.test_nonhash_value.AutoNumberInAList 2175 def __new__(cls, *args): global() member in TestSpecial.test_conflicting_types_resolved_in_new.LabelledIntEnum 2392 def __new__(cls, value): global() member in TestSpecial.test_multiple_mixin_inherited.MyInt 2410 def __new__(cls, value): global() member in TestSpecial.test_multiple_mixin_inherited.Fee 2595 def __new__(cls, value, sequence): global() member in TestSpecial.test_missing_value_error.Combined 2702 def __new__(cls, val): global() member in TestSpecial.test_value_backup_assign.Some 2752 def __new__(cls, c): global() member in TestSpecial.test_flag_with_custom_new.FlagFromChar 2767 def __new__(cls, c): global() member in TestSpecial.test_flag_with_custom_new.FlagFromChar 2783 def __new__(cls, c): global() member in TestSpecial.test_flag_with_custom_new.FlagFromChar 2798 def __new__(cls, *args): global() member in TestSpecial.test_init_exception.Base 2812 def __new__(cls, value): global() member in TestSpecial.test_init_exception.Base.MyEnum 4263 def __new__(cls, value, abbr=None): global() member in TestInternals.test_multiple_auto_on_line.Hah [all...] |
H A D | test_bool.py | 19 self.assertRaises(TypeError, int.__new__, bool, 0) 379 self.assertIs(bool.__new__(bool), False) 380 self.assertIs(bool.__new__(bool, 1), True) 381 self.assertIs(bool.__new__(bool, 0), False) 382 self.assertIs(bool.__new__(bool, False), False) 383 self.assertIs(bool.__new__(bool, True), True)
|
/third_party/python/Lib/ |
H A D | copyreg.py | 49 obj = object.__new__(cls) 51 obj = base.__new__(cls, state) 57 _new_type = type(int.__new__) 67 new = base.__new__ 105 return cls.__new__(cls, *args) 111 return cls.__new__(cls, *args, **kwargs)
|
H A D | enum.py | 267 '_value_ not set in __new__, unable to create it' 496 def __new__(metacls, cls, bases, classdict, *, boundary=None, _simple=False, **kwds): member in EnumType 499 # inherited __new__ unless a new __new__ is defined (or the resulting 503 return super().__new__(metacls, cls, bases, classdict, **kwds) 528 __new__, save_new, use_args = metacls._find_new_( 531 classdict['_new_member_'] = __new__ 559 enum_class = super().__new__(metacls, cls, bases, classdict, **kwds) 561 # any exceptions raised by member.__new__ will get converted to a 615 # replace any other __new__ wit 1091 def __new__(cls, value): global() member in Enum 1266 def __new__(cls, *values): global() member in StrEnum [all...] |
H A D | abc.py | 105 def __new__(mcls, name, bases, namespace, /, **kwargs): member in .ABCMeta 106 cls = super().__new__(mcls, name, bases, namespace, **kwargs)
|
H A D | _threading_local.py | 207 def __new__(cls, /, *args, **kw): member in local 210 self = object.__new__(cls)
|
/third_party/python/Lib/http/ |
H A D | __init__.py | 26 def __new__(cls, value, phrase, description=''): member in HTTPStatus 27 obj = int.__new__(cls, value) 163 def __new__(cls, value, description): member in HTTPMethod 164 obj = str.__new__(cls, value)
|
/third_party/protobuf/python/google/protobuf/ |
H A D | descriptor.py | 80 def __new__(cls): member in _Lock 81 self = object.__new__(cls) 289 def __new__(cls, name, full_name, filename, containing_type, fields, member in Descriptor 536 def __new__(cls, name, full_name, index, number, type, cpp_type, label, member in FieldDescriptor 654 def __new__(cls, name, full_name, filename, values, member in EnumDescriptor 714 def __new__(cls, name, index, number, member in EnumValueDescriptor 757 def __new__( member in OneofDescriptor 801 def __new__(cls, name, full_name, index, methods, options=None, member in ServiceDescriptor 866 def __new__(cls, name, full_name, index, containing_service, member in MethodDescriptor 927 def __new__(cl member in FileDescriptor [all...] |
/third_party/python/Lib/ctypes/test/ |
H A D | test_init.py | 9 def __new__(cls): member in X 10 result = super().__new__(cls) 25 # doesn't call the structure's __new__ and __init__ 30 # But explicitly creating an X structure calls __new__ and __init__, of course.
|
/third_party/python/Lib/importlib/metadata/ |
H A D | _adapters.py | 30 def __new__(cls, orig: email.message.Message): member in Message 31 res = super().__new__(cls)
|
/third_party/littlefs/scripts/ |
H A D | summary.py | 50 def __new__(cls, x=0): member in Int 65 return super().__new__(cls, x) 128 def __new__(cls, x=0.0): member in Float 143 return super().__new__(cls, x) 169 def __new__(cls, a=0, b=None): member in Frac 176 return super().__new__(cls, Int(a), Int(b)) 312 def __new__(cls, **r): function 313 return cls.__mro__[1].__new__(cls, 337 '__new__': __new__, [all...] |
/third_party/node/tools/inspector_protocol/jinja2/ |
H A D | _compat.py | 91 def __new__(cls, name, this_bases, d): member in with_metaclass.metaclass 93 return type.__new__(metaclass, 'temporary_class', (), {})
|
/third_party/node/deps/v8/third_party/markupsafe/ |
H A D | __init__.py | 68 def __new__(cls, base=u'', encoding=None, errors='strict'): member in Markup 72 return text_type.__new__(cls, base) 73 return text_type.__new__(cls, base, encoding, errors)
|
/third_party/node/tools/inspector_protocol/markupsafe/ |
H A D | __init__.py | 68 def __new__(cls, base=u'', encoding=None, errors='strict'): member in Markup 72 return text_type.__new__(cls, base) 73 return text_type.__new__(cls, base, encoding, errors)
|
/third_party/skia/third_party/externals/markupsafe/ |
H A D | __init__.py | 68 def __new__(cls, base=u'', encoding=None, errors='strict'): member in Markup 72 return text_type.__new__(cls, base) 73 return text_type.__new__(cls, base, encoding, errors)
|
/third_party/python/Lib/test/test_asyncio/ |
H A D | test_futures.py | 174 fut = self.cls.__new__(self.cls, loop=self.loop) 177 fut = self.cls.__new__(self.cls, loop=self.loop) 180 fut = self.cls.__new__(self.cls, loop=self.loop) 184 fut = self.cls.__new__(self.cls, loop=self.loop) 188 fut = self.cls.__new__(self.cls, loop=self.loop) 192 fut = self.cls.__new__(self.cls, loop=self.loop) 196 fut = self.cls.__new__(self.cls, loop=self.loop) 200 fut = self.cls.__new__(self.cls, loop=self.loop) 206 fut = self.cls.__new__(self.cls, loop=self.loop) 212 fut = self.cls.__new__(sel [all...] |
/third_party/jinja2/ |
H A D | _compat.py | 98 def __new__(cls, name, this_bases, d): member in with_metaclass.metaclass 101 return type.__new__(metaclass, "temporary_class", (), {})
|
/third_party/node/deps/v8/third_party/jinja2/ |
H A D | _compat.py | 98 def __new__(cls, name, this_bases, d): member in with_metaclass.metaclass 101 return type.__new__(metaclass, "temporary_class", (), {})
|
/third_party/python/Lib/re/ |
H A D | _constants.py | 57 def __new__(cls, value, name): member in _NamedIntConstant 58 self = super(_NamedIntConstant, cls).__new__(cls, value)
|