Home
last modified time | relevance | path

Searched refs:__missing__ (Results 1 - 18 of 18) sorted by relevance

/third_party/python/Lib/importlib/metadata/
H A D_collections.py20 def __missing__(self, key): member in FreezableDefaultDict
21 return getattr(self, '_frozen', super().__missing__)(key)
/third_party/python/Lib/test/
H A Dtest_userdict.py168 # Make sure UserDict doesn't have a __missing__ method
169 self.assertEqual(hasattr(collections.UserDict, "__missing__"), False)
171 # (D) subclass defines __missing__ method returning a value
172 # (E) subclass defines __missing__ method raising RuntimeError
173 # (F) subclass sets __missing__ instance variable (no effect)
174 # (G) subclass doesn't define __missing__ at all
176 def __missing__(self, key): member in UserDictTest.test_missing.D
185 def __missing__(self, key): member in UserDictTest.test_missing.E
196 # An instance variable __missing__ should have no effect
197 self.__missing__
[all...]
H A Dtest_defaultdict.py54 self.assertRaises(KeyError, d1.__missing__, 42)
56 self.assertEqual(d1.__missing__(42), [])
H A Dtest_dynamic.py140 def __missing__(self, key): member in RebindBuiltinsTests.test_load_global_specialization_failure_keeps_oparg.MyGlobals
H A Dtest_getpath.py909 def __missing__(self, key): member in MockNTNamespace
1086 def __missing__(self, key): member in MockPosixNamespace
H A Dtest_ordered_dict.py256 # make sure pop still works when __missing__ is defined
258 def __missing__(self, key): member in OrderedDictTests.test_pop.Missing
405 # make sure setdefault still works when __missing__ is defined
407 def __missing__(self, key): member in OrderedDictTests.test_setdefault.Missing
H A Dtest_dict.py744 # Make sure dict doesn't have a __missing__ method
745 self.assertFalse(hasattr(dict, "__missing__"))
746 self.assertFalse(hasattr({}, "__missing__"))
748 # (D) subclass defines __missing__ method returning a value
749 # (E) subclass defines __missing__ method raising RuntimeError
750 # (F) subclass sets __missing__ instance variable (no effect)
751 # (G) subclass doesn't define __missing__ at all
753 def __missing__(self, key): member in DictTest.test_missing.D
763 def __missing__(self, key): member in DictTest.test_missing.E
772 # An instance variable __missing__ shoul
[all...]
H A Dtest_types.py1079 def __missing__(self, key): member in MappingProxyTests.test_missing.dictmissing
H A Dtest_collections.py167 def __missing__(self, key): member in TestChainMap.test_missing.DefaultChainMap
H A Dtest_unicode.py1389 def __missing__(self, key): member in UnicodeTest.test_format_map.Mapping
/third_party/python/Lib/email/
H A D_encoded_words.py77 def __missing__(self, key): member in _QByteMap
/third_party/python/Lib/collections/
H A D__init__.py599 def __missing__(self, key): member in Counter
995 def __missing__(self, key): member in ChainMap
1004 return self.__missing__(key) # support subclasses that define __missing__
1122 if hasattr(self.__class__, "__missing__"):
1123 return self.__class__.__missing__(self, key)
1135 # Modify __contains__ to work correctly when __missing__ is present
/third_party/python/Lib/idlelib/
H A Dpyparse.py114 def __missing__(self, key): member in ParseMap
118 # Map all ascii to 120 to avoid __missing__ call, then replace some.
/third_party/python/Include/internal/
H A Dpycore_global_strings.h146 STRUCT_FOR_ID(__missing__)
H A Dpycore_runtime_init.h769 INIT_ID(__missing__), \
/third_party/python/Lib/urllib/
H A Dparse.py826 # Keeps a cache internally, via __missing__, for efficiency (lookups
835 def __missing__(self, b): member in _Quoter
/third_party/python/Lib/test/test_sqlite3/
H A Dtest_dbapi.py885 def __missing__(self, key): member in CursorTests.test_execute_dict_mapping_mapping.D
/third_party/python/Objects/
H A Ddictobject.c2505 /* Look up __missing__ method if we're a subclass. */ in dict_subscript()
2508 (PyObject *)mp, &_Py_ID(__missing__)); in dict_subscript()

Completed in 45 milliseconds