[3.12] Improve code examples in typing.rst
(GH-105346)
#105422
Merged
typing.rst
(GH-105346)
#105422