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/glossary.rst
+2-2
Original file line number
Diff line number
Diff line change
@@ -16,11 +16,11 @@ Glossary
16
16
A regular class whose attributes are stored in the `object.__dict__` attribute of every single instance.
17
17
This is quite wasteful especially for objects with very few data attributes and the space consumption can become significant when creating large numbers of instances.
18
18
19
-
This is the type of class you get by default both with and without ``attrs`` (except with the next APIs `attr.define`, `attr.mutable`, and `attr.frozen`).
19
+
This is the type of class you get by default both with and without ``attrs`` (except with the next APIs `attrs.define()`, `attrs.mutable()`, and `attrs.frozen()`).
20
20
21
21
slotted classes
22
22
A class whose instances have no `object.__dict__` attribute and `define <https://docs.python.org/3/reference/datamodel.html#slots>`_ their attributes in a `object.__slots__` attribute instead.
23
-
In ``attrs``, they are created by passing ``slots=True`` to ``@attr.s`` (and are on by default in `attr.define`/`attr.mutable`/`attr.frozen`).
23
+
In ``attrs``, they are created by passing ``slots=True`` to ``@attr.s`` (and are on by default in `attrs.define()`/`attrs.mutable()`/`attrs.frozen()`).
24
24
25
25
26
26
Their main advantage is that they use less memory on CPython [#pypy]_ and are slightly faster.
0 commit comments