I was wondering if it is possible to define the type of keys and values of a dictionary can take when you initialise a dict.
I was expecting something like that :
myDict = dict(int, aClass)
or
myDict = dict[int, aClass]
i know how to declare a dictbut what i want is to code "This dict can only take a int as key and an instance of MyClass as a value"
but it does not work.
Thank you very much!
FinnStark