2 ms·
What you say sounds right, but it's not. Using some DB APIs you'll get back a list of results, and you'll know from the SQL that it will only have one result.
by cturner 16y ago
What you say sounds right, but it's not. Using some DB APIs you'll get back a list of results, and you'll know from the SQL that it will only have one result.
Another example is if you know there is a single item in a data structure, and use list comprehension to extract it. You'll end up with a list of one item.
These situations happen, and for good reasons.