blob: 0c6b9a0eccc3bed7f68a7c91c9ec55158949e0c5 [file] [log] [blame] [view] [edit]
# dataclasses
This is the dataclasses.py module from the Python 3.7 standard library,
backported to Python 3.6.
Example usage:
```python
import dataclasses
@dataclasses.dataclass
class Foo:
foo: str # The Foo() constructor will require a value for this field.
bar: int = 42 # Default value if one is not passed to the constructor.
def sum_one(self) -> int:
return self.bar + 1
```
More details: https://www.python.org/dev/peps/pep-0557/