Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: