Skip to content

Test that original list is not modified for high scores tests #1868

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

Closed
wants to merge 2 commits into from

Conversation

adamzev
Copy link

@adamzev adamzev commented Jul 27, 2019

The mentor notes mention the importance of using sorted() instead of sort() (which mutates the list and makes subsequent calls to latest incorrect) but this case is not currently tested for and easy for mentors to miss.

The mentor notes mention the importance of using `sorted()` instead of `sort()` (which mutates the list and makes subsequent calls to `latest` incorrect) but this case is not currently tested for and easy for mentors to miss.
@adamzev adamzev requested a review from a team as a code owner July 27, 2019 22:01
list.copy is not available in Python 2.7
@cmccandless
Copy link
Contributor

This is an issue that has been raised multiple times (#1735, #1745), and was one of the driving forces for converting the exercise from a class-based implementation to a funciton-based one.

If the mentor notes indicate that immutability is a requirement, they are wrong and need amended.

If the mentor notes simply state that immutability is a strong recommendation, that is perfectly valid; this exercise is an early core exercise, and is meant to be a simple practice in working with arrays. Immutability is a subject for a later exercise.

@adamzev
Copy link
Author

adamzev commented Jul 29, 2019

It is difficult for me to tell from the mentor notes what is a suggestion and what is a requirement for accepting the exercise. All the reasonable solutions use sorted. My assumption was that more was required than just passing the tests or the acceptance would have been automatic and based on that. I'll close this, read the other threads (I did try a search or two first, sorry about the duplicate) and look into clarifying the mentor notes.

@adamzev
Copy link
Author

adamzev commented Jul 29, 2019

If the mentor notes indicate that immutability is a requirement, they are wrong and need amended.

I wouldn't say the current mentor notes are wrong, just a bit too open for interpretation. I created a pull request on the notes.

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