title: Shall I override default fields using inheritance?
body: <p>EDIT: ChatterOne's answer is good. I must keep it plain simple. No bizarre/wacky behavior is worth to avoid repeating a simple, explicit and useful variable.</p>
  <p><strong>What I wanted (pseudo-code example):</strong> Getting rid of &quot;server&quot; parameters.</p>
  <pre><code>Config.default_values.server = Server.application
  class ApplicationDbConfig(Enum):
      database_1 = Config(Database.db1)
      database_2 = Config(Database.db2)
      ...
  
  
  Config.default_values.server = Server.warehouse
  class WarehouseDatabaseConfig(Enum):
      database_1 = Config(Database.db1)
      database_2 = Config(Database.db2)
      ...
  </code></pre>
  <p><strong>What best solution is:</strong></p>
  <p>Keep your variables explicit. no need to hide it or change a state internally.
  Explicit and clear is better. So I shall abandon my objective of getting rid of <code>s</code> and keep it simple.</p>
  <pre><code>s = Server.application
  class ApplicationDatabaseConfig(Enum):
      database_1 = Config(Database.db1, s)
      database_2 = Config(Database.db2, s)
      ...
  
  
  s = Server.warehouse
  class WarehouseDatabaseConfig(Enum):
      database_1 = Config(Database.db1, s)
      database_2 = Config(Database.db2, s)
      ...
  </code></pre>
  <p><strong>The original question was:</strong>
  Is it worth it to use inheritance to override default parameters? Or do you have a better way to do it?</p>
  <p>This is the original code I used to do this, using inheritance. It took too much space and added a lot of noise for the viewer.</p>
  <pre><code>@dataclass
  class Config:
      database: Database
      server: Server
      driver: Driver = Driver.sql_serv_native_client_11
      is_trusted: bool = True
      additional_params: str = None
  
  
  @dataclass
  class ApplicationConfig(Config): server: Server = Server.application
      
  @dataclass
  class WarehouseConfig(Config): server: Server = Server.warehouse
  
  ...
  
  class ApplicationDatabasesConfig(Enum):
      database_1 = ApplicationConfig(Database.db1)
      database_2 = ApplicationConfig(Database.db2)
      ...
  
  
  class WarehouseDatabasesConfig(Enum):
      database_3 = WarehouseConfig(Database.db3)
      database_4 = WarehouseConfig(Database.db4)
      ...
  </code></pre>