Skip to content

Confused on API #16

@adamhammes

Description

@adamhammes

Taken from the readme:

# get all the seasons from Game Of Thrones
seasons = test_api.seasons()
for season in seasons:
    for episode in seasons[season]:
        # will print the magnet link of all episodes, in all seasons
        print seasons[season][episode]

What was the choice to go with above over something like:

season = tes_api.seasons()
for season in seasons:
    for episode in season:
        print episode

That is, directly iterating over the seasons/episodes instead of using indexes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions