class Foo:

    def __init__(self):
        self.bar = 'bar'
self.baz = 'baz'

def get_baz(self):
    return self.baz
Is directly accessing class attribute faster than getting the value via a getter function?