Q:

difference between Class().property and self.class.property

The following code is my original attempt at getting a gui app to update its font etc,, when the user changed it in the config.ini settings:
def on_config_change(self, config, section, key, value):
    """
    sets font,size colour etc..
    when user changes in settings.
    """
     if config is self.config:
    token = (section, key)
    if token == ('Font', 'button_font'):
        print('Our button font has  been changed to', value)
        GetInformation().lay_button.font_size = str(value)
        GetInformation().bet_button.font_size = str(value)

def build(self):
    self.config.write()
    return GetInformation()

My code updated the config but the screen never updated without restarting the app.
The following code  works:
def on_config_change(self, config, section, key, value):
    """
    sets font,size colour etc..
    when user changes in settings.
    """

    if config is self.config:
        token = (section, key)
        if token == ('Font', 'button_font'):
            print('Our button font has  been changed to', value)
            self.getInformation.lay_button.font_size = str(value)
            self.getInformation.bet_button.font_size = str(value)

def build(self):
    self.config.write()
    self.getInformation = GetInformation()
    return self.getInformation

What is the difference between calling GetInformation().lay_button.font_size
and  self.getInformation.lay_button.font_size? 

A:

Unless you design your code specifically (typically a Singleton pattern), Class().method() creates a new object instantiated from Class and calls on it the method method. The object is then destroyed as there is no receiving variable specified.
self.object.method() on the other hand calls the method method on the existing object self.object. This object is persistent as it is saved as a member of your top level class (self).
In your first example, you are actually calling different methods on three different objects. In the method on_config_change, the two objects are immediately destroyed. In the second example, all the calls apply on the same object, that then keeps its modified properties.

