Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60ca37f commit 05008c2Copy full SHA for 05008c2
1 file changed
Doc/library/dataclasses.rst
@@ -536,10 +536,10 @@ class :meth:`~object.__init__` methods. If the base class has an :meth:`~object.
536
that has to be called, it is common to call this method in a
537
:meth:`__post_init__` method::
538
539
- @dataclass
540
class Rectangle:
541
- height: float
542
- width: float
+ def __init__(self, height, width):
+ self.height = height
+ self.width = width
543
544
@dataclass
545
class Square(Rectangle):
0 commit comments