Skip to content

Commit 3b20764

Browse files
Small explanation(context) for 'how GenericAlias objects behave like classes'
1 parent 568bf02 commit 3b20764

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/spec/generics.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,8 +397,8 @@ the runtime class of the objects created by instantiating them doesn't
397397
record the distinction. This behavior is called "type erasure"; it is
398398
common practice in languages with generics (e.g. Java, TypeScript).
399399

400-
Additionally, at the runtime, objects like ``Node[int]`` will not be considered as a class,
401-
even though they behave like them. This is because these objects are instances of ``GenericAlias``::
400+
Additionally, objects like ``Node[int]`` will not be considered as a class at the runtime,
401+
even though they behave like them (e.g they can be instantiated). This is because these objects are instances of ``GenericAlias``::
402402

403403
import inspect
404404

0 commit comments

Comments
 (0)