PEP 636: add missing @dataclass (#1879)
This commit is contained in:
parent
bd6beb5316
commit
be1c166f4b
|
@ -509,6 +509,9 @@ If you are using classes to structure your data
|
|||
you can use the class name followed by an argument list resembling a
|
||||
constructor, but with the ability to capture attributes into variables::
|
||||
|
||||
from dataclasses import dataclass
|
||||
|
||||
@dataclass
|
||||
class Point:
|
||||
x: int
|
||||
y: int
|
||||
|
|
Loading…
Reference in New Issue