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
|
you can use the class name followed by an argument list resembling a
|
||||||
constructor, but with the ability to capture attributes into variables::
|
constructor, but with the ability to capture attributes into variables::
|
||||||
|
|
||||||
|
from dataclasses import dataclass
|
||||||
|
|
||||||
|
@dataclass
|
||||||
class Point:
|
class Point:
|
||||||
x: int
|
x: int
|
||||||
y: int
|
y: int
|
||||||
|
|
Loading…
Reference in New Issue