Lines Matching refs:__slots__
270 __slots__ = ['prec']
1062 # We set __slots__ = () to ensure that the subclasses are
1071 __slots__ = ()
1076 __slots__ = ()
1081 __slots__ = ()
1086 __slots__ = ()
1091 __slots__ = ()
1096 __slots__ = ()
1101 __slots__ = ()
1106 # Testing __slots__...
1108 __slots__ = []
1114 __slots__ = ['a']
1126 __slots__ = ['a', 'b', 'c']
1141 __slots__ = ['__a']
1160 __slots__ = [None]
1167 __slots__ = ["foo bar"]
1174 __slots__ = ["foo\0bar"]
1181 __slots__ = ["1"]
1188 __slots__ = [""]
1194 __slots__ = ["a", "a_b", "_a", "A0123456789Z"]
1200 __slots__ = "abc"
1208 __slots__ = "abc"
1216 __slots__ = slots
1224 __slots__ = [chr(128)]
1238 __slots__ = ['a', 'b', 'c']
1257 __slots__ = ['e']
1269 __slots__ = ['a', 'b']
1290 __slots__ = ['a', 'b']
1303 __slots__ = "a"
1309 __slots__ = "a"
1313 # Test string subclass in `__slots__`, see gh-98783
1317 __slots__ = (SubStr('x'),)
1323 # Testing __dict__ and __weakref__ in __slots__...
1325 __slots__ = ["__dict__"]
1333 __slots__ = ["__weakref__"]
1345 __slots__ = []
1353 __slots__ = []
1361 # Testing __qualname__ and __classcell__ in __slots__
1371 __slots__ = ["__classcell__"]
1384 __slots__ = ["__classcell__"]
1387 __slots__ = ["__qualname__"]
1398 __slots__ = ["__qualname__"]
1405 __slots__ = "a"
1514 __slots__ = 1
1518 self.fail("__slots__ = 1 should be illegal")
1522 __slots__ = [1]
1526 self.fail("__slots__ = [1] should be illegal")
2246 __slots__ = ['foo']
2255 __slots__ = ['foo', '__weakref__']
2727 __slots__ = []
2773 __slots__ = ['prec']
3296 class Int(int): __slots__ = []
3304 __slots__ = ["a", "b"]
3306 __slots__ = ["b", "a"]
3308 __slots__ = ["a", "b"]
3310 __slots__ = ["c", "b"]
3312 __slots__ = ["a", "b", "d"]
3314 __slots__ = ["e"]
3316 __slots__ = ["e"]
3318 __slots__ = ["__weakref__"]
3320 __slots__ = ["__dict__"]
3324 __slots__ = ["__dict__", "__weakref__"]
3895 __slots__ = ['x']
3906 __slots__=()
3910 __slots__=()
4809 __slots__ = ["foo"]
4812 self.assertEqual("'foo' in __slots__ conflicts with class variable", m)
5256 __slots__ = tuple(state)
5314 if hasattr(obj, '__slots__'):
5315 self.assertListEqual(obj.__slots__, objcopy.__slots__, msg=msg)
5316 for slot in obj.__slots__:
5349 # Tests pickling of classes with __slots__.
5351 # Pickling of classes with __slots__ but without __getstate__ should
5355 __slots__ = ['a']
5367 __slots__ = ['a']
5371 for slot in cls.__dict__.get('__slots__', ()):
5390 __slots__ = ['b']