Key not found in db, returns "None" or "not Found"?

I found this at an interview.

If the data level function is: "get_person_by_key (person_key)" return "None" or throw an exception "NotFound" if the "person_key" does not match the database record? Please explain your reasoning.

Does this difference make sense? I feel skeptical.

+4
source share

Source: https://habr.com/ru/post/1495864/


All Articles