You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/how-does-it-work.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,8 @@
7
7
*attrs* isn't the first library that aims to simplify class definition in Python.
8
8
But its **declarative** approach combined with **no runtime overhead** lets it stand out.
9
9
10
-
Once you apply the `@attrs.define` (or `@attr.s`) decorator to a class, *attrs* searches the class object for instances of `attrs.field`s.
10
+
Once you apply the `@attrs.define` (or `@attr.s`) decorator to a class, *attrs* searches the class object for {doc}`types` and instances of `attrs.field`s.
11
11
Internally they're a representation of the data passed into `field` along with a counter to preserve the order of the attributes.
12
-
Alternatively, it's possible to define them using {doc}`types`.
13
12
14
13
In order to ensure that subclassing works as you'd expect it to work, *attrs* also walks the class hierarchy and collects the attributes of all base classes.
15
14
Please note that *attrs* does *not* call `super()`*ever*.
0 commit comments