From 0508d92475083cb722d5bed7d932c4e0ce74ff7e Mon Sep 17 00:00:00 2001 From: Roman Miroshnychenko Date: Thu, 15 Dec 2016 14:12:10 +0200 Subject: [PATCH] Add comments about generator functions --- main.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index f1163ba..0114eac 100644 --- a/main.py +++ b/main.py @@ -75,22 +75,30 @@ def get_url(**kwargs): def get_categories(): """ Get the list of video categories. + Here you can insert some parsing code that retrieves the list of video categories (e.g. 'Movies', 'TV-shows', 'Documentaries' etc.) from some site or server. + .. note:: Consider using `generator functions `_ + instead of returning lists. + :return: The list of video categories :rtype: list """ - return VIDEOS.keys() + return VIDEOS.iterkeys() def get_videos(category): """ Get the list of videofiles/streams. + Here you can insert some parsing code that retrieves the list of video streams in the given category from some site or server. + .. note:: Consider using `generators functions `_ + instead of returning lists. + :param category: Category name :type category: str :return: the list of videos in the category