File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -93,11 +93,14 @@ This is equivalent to omitting the generic notation and just saying
9393User-defined generic types
9494--------------------------
9595
96- You can define a user-defined class as generic in three ways: by including a
97- ``Generic `` base class, by using the new generic class syntax in Python 3.12
98- and higher, or by including a ``Protocol `` base class parameterized with type
99- variables. The third approach also marks the class as a protocol - see
100- :ref: `generic protocols<generic-protocols> ` for more information.
96+ There are several ways to define a user-defined class as generic:
97+
98+ * Include a ``Generic `` base class.
99+ * Use the new generic class syntax in Python 3.12 and higher.
100+ * Include a `` Protocol`` base class parameterized with type variables. This
101+ approach also marks the class as a protocol - see
102+ :ref: `generic protocols<generic-protocols> ` for more information.
103+ * Include a generic base class parameterized with type variables.
101104
102105Example using ``Generic ``::
103106
You can’t perform that action at this time.
0 commit comments