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 18040f5 commit fe7ebb0Copy full SHA for fe7ebb0
README.md
@@ -94,7 +94,16 @@ After *declaring* your attributes, *attrs* gives you:
94
**Hate type annotations**!?
95
No problem!
96
Types are entirely **optional** with *attrs*.
97
-Simply assign `attrs.field()` to the attributes instead of annotating them with types.
+Simply assign `attrs.field()` to the attributes instead of annotating them with types:
98
+
99
+```python
100
+from attrs import define, field
101
102
+@define
103
+class SomeClass:
104
+ a_number = field(default=42)
105
+ list_of_numbers = field(factory=list)
106
+```
107
108
---
109
0 commit comments