Currently, some BukuDb methods (searchdb(), search_by_tag()) that return a list are returning None instead of an empty list (…sometimes).
This doesn't seem to improve the result usability (empty list is just as falsey as None), and conversely may complicate its processing (since None can't be iterated over nor concatenated). Thus, I suggest always returning a list value in these methods.
…Also, some methods (get_rec_all(), search_keywords_and_filter_by_tag(), exclude_results_from_search()) always return a list (regardless of documented return type), which makes the API inconsistent.
Currently, some BukuDb methods (
searchdb()
,search_by_tag()
) that return a list are returningNone
instead of an empty list (…sometimes).This doesn't seem to improve the result usability (empty list is just as falsey as
None
), and conversely may complicate its processing (sinceNone
can't be iterated over nor concatenated). Thus, I suggest always returning a list value in these methods.…Also, some methods (
get_rec_all()
,search_keywords_and_filter_by_tag()
,exclude_results_from_search()
) always return a list (regardless of documented return type), which makes the API inconsistent.