Skip to content

[List Ops]: Potential mismatch between instructions and tests #3141

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
OndrejMarsalek opened this issue Jul 14, 2022 · 3 comments
Closed

[List Ops]: Potential mismatch between instructions and tests #3141

OndrejMarsalek opened this issue Jul 14, 2022 · 3 comments

Comments

@OndrejMarsalek
Copy link

The instructions for append say "given two lists, add all items in the second list to the end of the first list". Although I understand someone could read it the other way, to me, a strict reading of this is that the first list should be modified. The tests do not guard against constructing a third list that contains items from both inputs, and people will commonly solve this with return list1 + list2. I think that either the instructions or tests should be updated, but I am not submitting a PR, as it is not clear to me what the original intention was.

@github-actions
Copy link
Contributor

🤖   🤖

Hi! 👋🏽 👋 Welcome to the Exercism Python Repo!

Thank you for opening an issue! 🐍  🌈 ✨


  •   If you are requesting support, we will be along shortly to help. (generally within 72 hours, often more quickly).
  •   Found a problem with tests, exercises or something else??  🎉
      ◦ We'll take a look as soon as we can & identify what work is needed to fix it. (generally within 72 hours).

​          ◦ If you'd also like to make a PR to fix the issue, please have a quick look at the Pull Requests doc.
             We  💙  PRs that follow our Exercism & Track contributing guidelines!

  •   Here because of an obvious (and small set of) spelling, grammar, or punctuation issues with one exercise,
      concept, or Python document?? 🌟 Please feel free to submit a PR, linking to this issue. 🎉
    ‼️  Please Do Not ‼️

    ​        ❗ Run checks on the whole repo & submit a bunch of PRs.
                  This creates longer review cycles & exhausts reviewers energy & time.
                  It may also conflict with ongoing changes from other contributors.
    ​        ❗ Insert only blank lines, make a closing bracket drop to the next line, change a word
                  to a synonym without obvious reason, or add trailing space that's not an EOL for the very end of text files.
            ❗ Introduce arbitrary changes "just to change things" .

            ...These sorts of things are not considered helpful, and will likely be closed by reviewers.

  • For anything complicated or ambiguous, let's discuss things -- we will likely welcome a PR from you.
  • Here to suggest a feature or new exercise?? Hooray! Please keep in mind Chesterton's Fence.
    Thoughtful suggestions will likely result faster & more enthusiastic responses from maintainers.

💛  💙  While you are here... If you decide to help out with other open issues, you have our gratitude 🙌 🙌🏽.
Anything tagged with [help wanted] and without [Claimed] is up for grabs.
Comment on the issue and we will reserve it for you. 🌈 ✨

@BethanyG
Copy link
Member

Hi @OndrejMarsalek 👋🏽

Thanks for filing this issue.

A few things here:

  1. Usually, tests only check outcomes, and do not check implementation. So checking that the first list was modified vs a new list returned is stretching that definition a little bit. However, the instructions do mention explicitly that list modification is expected, so....
  2. Per my comments in issue [List Ops]: def concat(lists) possible test error #3142, the exercise descriptions and test data for this exercise are pulled from problem specifications, so I'd suggest opening up an issue there to discuss the intent of the exercise task, and weather or not it is valid to create a new list, or if we should be explicitly checking for modification of the first list. I suspect this varies quite a bit from language to language, since some are pass by reference and some are pass by value.... and some (Python) are pass by object reference.
  3. We could potentially create a Python-only test case that does explicitly check for modification, but I think I'd like to have a discussion in problem specifications first.

@BethanyG
Copy link
Member

Closing to track under #3156. Please give a shout if you'd like to work on the issue.

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

No branches or pull requests

2 participants