title: Specifying Argument Type For List of Dictionary For a Python Function
body: <p>I have a function whose argument is a list of dictionaries. I am trying to specify the type of elements for the dictionary in the function argument. The dictionary has the following form:</p>
  <pre><code>{'my_object':my_object, 'data':int}
  </code></pre>
  <p><code>my_object</code> is a custom datatype. Is there any way to specify the type of dictionary, something like the one in below:</p>
  <pre><code>def my_function(x : list[dict[my_object, int]]):
  </code></pre>
  <p>Python complains about how I defined the type and gives me the following error:</p>
  <pre><code>TypeError: 'type' object is not subscriptable
  </code></pre>