I  python  novice, when flipping through python.org/dev/peps/pep-0484/-sharpthe-type-of-class-objects" rel=" nofollow noreferrer "> pep484 , and  mypy , I encountered something I didn"t understand, as follows: 
-sharp Construct an empty Stack[int] instance
stack = Stack[int]()
stack.push(2)
stack.pop()
stack.push("x") -sharp Type errormy personal understanding is:
- 
Tindicates any type
- 
Stack [int]meansStackcan only storeinttypes, so if a string is passed below, an error can be reported .
doubts are:
- I don"t know if the above understanding is correct .
- if I had identified the data types in the heap in the first place, why would I create a generic type?
-  does generics have any usage scenarios in python? I haven"t come into contact with languages such asjava, so I think it"s very abstract to look at the examples, and I don"t know how to use them in the above scenarios.
 I have just come into contact with  python . Please forgive me if there are any misunderstandings. I hope my seniors will be able to solve the doubts. 
