{"channel":"tech","content":"The question: in Python 3.9, how does one set up inheritance of dataclasses, when the base class contains fields with a default value?\r\n\r\nChatGPT and Claude both try to come up with solutions.  They, regularly, fail at this.\r\n\r\nEventually, the \"intelligent\" approach revealed itself: ask the *machine* to replace << @dataclass >> with some explicit constructors.","created_at":"2025-01-22T18:29:35.119268","id":141,"llm_annotations":{},"parent_id":null,"processed_content":"<p>The question: in Python 3.9, how does one set up inheritance of dataclasses, when the base class contains fields with a default value?\r</p>\n<p>ChatGPT and Claude both try to come up with solutions.  They, regularly, fail at this.\r</p>\n<p>Eventually, the \"intelligent\" approach revealed itself: ask the <em>machine</em> to replace <span class=\"literal-text\">@dataclass</span> with some explicit constructors.</p>","quotes":[],"subject":"a maze"}
