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

Describe/Document 'sorted' function #770

Open
charlie-becker opened this issue Dec 16, 2019 · 1 comment
Open

Describe/Document 'sorted' function #770

charlie-becker opened this issue Dec 16, 2019 · 1 comment

Comments

@charlie-becker
Copy link

@charlie-becker charlie-becker commented Dec 16, 2019

In the 'Tidying Up' section of the Creating Functions episode, the sorted built in function is introduced without providing any current (or prior) documentation about what it does. The line in question is:

filenames = sorted(glob.glob('inflammation*.csv'))

Possible solutions:

  • include a comment in the code itself

  • Add a description in the paragraph above

  • Remove the sorted command all together

@ldko

This comment has been minimized.

Copy link
Contributor

@ldko ldko commented Dec 16, 2019

Hi @charlie-becker, thanks for bringing up your concern. The sorted function first appears in the 05-files.md episode where it is briefly introduced to alphabetically sort the list of files produced by glob.glob(). When it comes up in the "Tidying Up" section it is in the context of "[reproducing] the previous analysis".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.