10 ms·
But you need to get the "id as whatever" first. Let's say you get the id from a HTML form as a string, and want to pass it to the library. Do you need to first
by ProblemFactory 9y ago
But you need to get the "id as whatever" first.
Let's say you get the id from a HTML form as a string, and want to pass it to the library. Do you need to first convert it to an int? A uuid.UUID object? A custom ID class in the library? Is passing None allowed?
A type declaration on the get_product() function would tell you, and let the compiler to check your code for mistakes.
- occams_chainsaw 9y agoIf they didn't document it, and aren't handling input for an ID that may be passed as an integer, then your problem is with the API, not the language.