Skip to content

Commit 691e9e4

Browse files
authored
Clarify runtime implementation of Generic (#1876)
1 parent 322ab67 commit 691e9e4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/spec/generics.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ for variance, see below).
139139
takes a single type parameter ``T``. This also makes ``T`` valid as
140140
a type within the class body.
141141

142-
The ``Generic`` base class uses a metaclass that defines ``__getitem__``
143-
so that ``LoggedVar[t]`` is valid as a type::
142+
The ``Generic`` base class implements the :func:`~object.__class_getitem__`
143+
classmethod so that ``LoggedVar[t]`` is valid as a type::
144144

145145
from collections.abc import Iterable
146146

0 commit comments

Comments
 (0)