News for hackers. Stuff that matters.
Re:Frankenstein's `__init__` by abdusco on Saturday April 19, 2025 @04:03PM (#43739062)
My go-to is a factory classmethod:

    class Foo:
        def __init__(self, config: Config): ...

        @classmethod
        def from_config_file(cls, filename: str):
          config = # parse config file
          return cls(config)

There are no comments on this comment yet.