Python update inherited dictionary

I have class

class Base:
     filters = {
        'today': '__today'        
    }

and another class

class Filter(Base):
     new_filters = {
            'yesterday': '__yesterday'        
        }
     filters = {**self.filter, **new_filter}

You may see the filter class above, I tried to add an additional key but it doesn’t seem to work,

Can anyone tell me what is the best way to do it?

Answer

You can work with the filters specified in Base with Base.filters:

class Filter(Base):
    new_filters = {
        'yesterday': '__yesterday'
    }
    filters = {**Base.filters, **new_filters}