This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author andrei.avk
Recipients MicaelJarniac, andrei.avk, docs@python, eric.smith
Date 2021-06-15.05:07:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1623733676.15.0.959920751451.issue44365@roundup.psfhosted.org>
In-reply-to
Content
How about this example:

@dataclass
class Rect:
    x: int
    y: int

r=Rect(5,2)

@dataclass
class HyperRect(Rect):
    z: int

    def __post_init__(self):
        self.vol = self.x*self.y*self.z

hr=HyperRect(5,2,3)
print("hr.vol", hr.vol)

Hyper Rectangle:
https://en.wikipedia.org/wiki/Hyperrectangle
History
Date User Action Args
2021-06-15 05:07:56andrei.avksetrecipients: + andrei.avk, eric.smith, docs@python, MicaelJarniac
2021-06-15 05:07:56andrei.avksetmessageid: <1623733676.15.0.959920751451.issue44365@roundup.psfhosted.org>
2021-06-15 05:07:56andrei.avklinkissue44365 messages
2021-06-15 05:07:56andrei.avkcreate