PEP 636: add missing @dataclass (#1879)

This commit is contained in:
Guilhem Saurel 2021-03-23 19:26:03 +01:00 committed by GitHub
parent bd6beb5316
commit be1c166f4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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