Home
last modified time | relevance | path

Searched refs:__classcell__ (Results 1 - 6 of 6) sorted by relevance

/third_party/python/Lib/test/
H A Dtest_super.py209 # __classcell__ is injected into the class namespace by the compiler
214 self.assertNotIn("__classcell__", namespace_snapshot)
217 # __classcell__ is the exact cell reference to be populated by
224 class_cell = namespace_snapshot["__classcell__"]
230 WithClassRef.__classcell__
235 # We test that case here by forcibly deleting __classcell__
238 namespace.pop('__classcell__', None)
247 # __class__ was not set, and asking if __classcell__ was propagated
249 expected_error = '__class__ not set.*__classcell__ propagated'
257 # Overwriting __classcell__ wit
[all...]
H A Dtest_descr.py1361 # Testing __qualname__ and __classcell__ in __slots__
1370 class C2(C1, metaclass=Meta, attr="__classcell__"):
1371 __slots__ = ["__classcell__"]
1374 self.assertIsInstance(C2.__dict__["__classcell__"],
1378 self.assertNotHasAttr(c, "__classcell__")
1379 c.__classcell__ = 42
1380 self.assertEqual(c.__classcell__, 42)
1383 __classcell__ = 42 variable in .test_slots_special2.C2.C3
1384 __slots__ = ["__classcell__"]
/third_party/python/Include/internal/
H A Dpycore_global_strings.h84 STRUCT_FOR_ID(__classcell__)
H A Dpycore_runtime_init.h707 INIT_ID(__classcell__), \
/third_party/python/Objects/
H A Dtypeobject.c2613 /* CPython inserts __qualname__ and __classcell__ (when needed) in type_new_copy_slots()
2617 !_PyUnicode_Equal(slot, &_Py_ID(__classcell__))) in type_new_copy_slots()
3046 type->tp_dict, &_Py_ID(__classcell__)); in type_new_set_classcell()
3057 "__classcell__ must be a nonlocal cell, not %.200R", in type_new_set_classcell()
3063 if (PyDict_DelItem(type->tp_dict, &_Py_ID(__classcell__)) < 0) { in type_new_set_classcell()
/third_party/python/Python/
H A Dcompile.c2750 /* Return __classcell__ if it is referenced, otherwise return None */ in compiler_class()
2752 /* Store __classcell__ into class namespace & return it */ in compiler_class()
2762 if (!compiler_nameop(c, &_Py_ID(__classcell__), Store)) { in compiler_class()

Completed in 44 milliseconds