Part of #43927. Accessing instance variables for string interpolation via an object's __dict__ makes it impossible to use properties (or any other descriptors), and makes it less clear that an instance variable is being used (e.g. searching for ".name" would not find these uses).
While f-strings (the preferred formatting solution) are only available from Python 3.6 onward, str.format() supports member access; e.g. "%(foo)s, %(bar)s" % self.__dict__ can be written as "{self.foo}, {self.bar}".format(self = self).
Part of #43927. Accessing instance variables for string interpolation via an object's __dict__ makes it impossible to use properties (or any other descriptors), and makes it less clear that an instance variable is being used (e.g. searching for ".name" would not find these uses).
While f-strings (the preferred formatting solution) are only available from Python 3.6 onward, str.format() supports member access; e.g. "%(foo)s, %(bar)s" % self.__dict__ can be written as "{self.foo}, {self.bar}".format(self = self).