Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in most_common_interests_with(user) method definition corrected #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Apr 21, 2017

  1. Bug in most_common_interests_with(user) method definition corrected

    Corrected `most_common_interests_with(user)` method definition is exactly the same as in the book (page8).
    The same result as the proposed correction would give a method which takes `user_id = user["id"]`argument instead of a dict type `user` argument. However, in that case the code that would be iterating through all the users to display the results would be less clean than in case of `user` argument:
    - For `user` argument:
    ```python
    for user in users:
        print most_common_interests_with(user)
    ```
    For `user_id` argument:
    ```python
    for user_id in range(len(users)):
        print most_common_interests_with(user_id)
    ```
    mdusan authored Apr 21, 2017
    Configuration menu
    Copy the full SHA
    2c3cd34 View commit details
    Browse the repository at this point in the history