Skip to content

Commit ec9ef8d

Browse files
committed
docs: add super warning
1 parent 12a3f76 commit ec9ef8d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/init.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,13 @@ C(x=42)
387387

388388
If you need more control, use the custom init approach described next.
389389

390+
:::{warning}
391+
You never need to use `super()` with *attrs* classes that inherit from other *attrs* classes.
392+
Each *attrs* class implements an `__init__` based on its own fields and those of all its base classes.
393+
394+
You only need this escape hatch when subclassing non-*attrs* classes.
395+
:::
396+
390397

391398
### Custom Init
392399

0 commit comments

Comments
 (0)