Safety measures now that str and tuple are subclassable:

If tp_itemsize of the basetype is nonzero, only allow empty __slots__
(declaring that no __dict__ should be added), and don't add a weakref
offset.
1 file changed