You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that every directory/package has a modules.py file, is this truly necessary now that the documentation and README both state using help() to view the modules? I feel these can be outright removed, and the supported algorithms for each section can be simply listed on the README or we can point the user to the Documentation
I've also noticed that every file and every class has this get_code() method and most files have time_complexities() method. Are these truly necessary? Since python is open source, any user can simply open the file up and view the code.
time_complexities() seems somewhat unnecessary. Instead of storing the time complexity information in a method, why not store it in the file's docstrings or the methods docstrings?
Example:
frompygorithm.sortingimportbubble_sorthelp(bubble_sort.sort)
"""Help on function sort in module pygorithm.sorting.bubble_sort:sort(_list) Bubble Sorting algorithm Time Complexities: - Best O(n) - Average O(n*(n-1)/4) - Worst O(n^2) :param _list: list of values to sort :return: sorted values"""
The text was updated successfully, but these errors were encountered:
IanDoarn
changed the title
Removal/Rework of get_code() and time_complexities()
[enhancement] Removal/Rework of get_code() and time_complexities()
Aug 21, 2017
IanDoarn
changed the title
[enhancement] Removal/Rework of get_code() and time_complexities()
[enhancement] Removal/Rework of get_code(), time_complexities(), and modules.py
Aug 21, 2017
I think time_complexities() is necessary as some of the users may need it to display them right in the Python interpreter. Docstrings seems great idea to place time complexities but many users especially who are beginners dont know much about docstrings. Hence it would nice to keep time_complexities(). Removing modules.py would be a great idea though!
I've noticed that every directory/package has a modules.py file, is this truly necessary now that the documentation and README both state using help() to view the modules? I feel these can be outright removed, and the supported algorithms for each section can be simply listed on the README or we can point the user to the Documentation
I've also noticed that every file and every class has this get_code() method and most files have time_complexities() method. Are these truly necessary? Since python is open source, any user can simply open the file up and view the code.
time_complexities() seems somewhat unnecessary. Instead of storing the time complexity information in a method, why not store it in the file's docstrings or the methods docstrings?
Example:
OR
The text was updated successfully, but these errors were encountered: