The problem is that the source code is often just a wrapper for another function... which you then have to read the source code for, etc, etc.
I can't personally guess the type of the `id` argument to the hypothetical `add_item(id, qty)` function, but I would guess that the source code for that function would look like
Why would you add the unnecessary level of indirection with the _add_item() method? And if your application uses standard IDs throughout then yes you can guess it :)
This happens all the time. Usually at api intersection boundaries. I do this a lot interfacing camera drivers in some flavor of C with C++ run times, so most gets passed through, but char* goes to string, pointers go to shared_ptr, etc.
I also use it a lot at boundaries where the modality changes, eg going from local data structures to RPC, where the data shape is the same, but there is io and fault tolerance to deal with.
I can't personally guess the type of the `id` argument to the hypothetical `add_item(id, qty)` function, but I would guess that the source code for that function would look like
I would also note that python type hints can be which is significantly more helpful than just knowing it's a dict.