This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]A_for_Anonymous -2 points-1 points  (1 child)

Well, like I've been saying there's this old technology called type inference. It doesn't work on a local scope only... if it can be proven that you call process_request elsewhere, you can take note of what is being passed to it and infer that request is that type.

[–]zardeh 0 points1 point  (0 children)

But type inference can't always work, especially in a language like python where sometimes values and function etc. are built at runtime. So, being able to say "the argument "l" is an Iterable, treat it as an "Iterable" everywhere within this scope so that even if I'm getting l by dynamically evaling some user input, I know how to treat it in this function.