Skip to content

Add docstring and comments per Issue #727 #895

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

Merged
merged 1 commit into from
Jun 18, 2019
Merged

Add docstring and comments per Issue #727 #895

merged 1 commit into from
Jun 18, 2019

Conversation

StephenGemin
Copy link
Contributor

I've added comments to make understanding this method a little easier for those that are not familiar. This should close out #727 .

Other changes:

  1. added if name == 'main' rather than the "# MAIN" comment
  2. put in return for distances and vertices. Previously everything was just printed out, but someone may find it useful to have the algorithm return something.
  3. Other PEP8 changes
  4. Added example input and expected output as a check to make sure any future changes will give the same output.

I've added comments to make understanding this method a little easier for those that are not familiar.  This should close out #727 .

Other changes:
1. added if __name__ == '__main__' rather than the "# MAIN" comment
2. put in return for distances and vertices.  Previously everything was just printed out, but someone may find it useful to have the algorithm return something.
3. Other PEP8 changes
4.  Added example input and expected output as a check to make sure any future changes will give the same output.
Copy link
Member

@poyea poyea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your pull request!🤩

@poyea poyea merged commit a99acae into TheAlgorithms:master Jun 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants