[Error-Handling]: instructions are unclear, and wrong programs pass the tests

Aperta
#1,780 11 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@BethanyG ci sta già lavorando.

Dal 16/6/2021.

  • #2281 di @BethanyG — integrata

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

bug 🐛 smolder🍲

I just did the error-handling exercise, and had several issues:

  • It was unclear at first what to do with inputs. Looking at the tests, it seemed that trying to convert the input to int was the right thing to try, but this is not mentioned in the readme or the stubs.
  • The test for whether a method throws an exception will pass any error that might occur, not just if it's intentionally raised:
def handle_error_by_throwing_exception():
    raise "(╯°□°)╯︵ ┻━┻"  # Raising a string is a TypeError, but passes the test
  • When returning a tuple, which element should be the result and which one the status? What should the result element be when it fails? No suggestion
  • No mention of advantages or disadvantages of the different kinds of error handling, or what is idiomatic Python.
Lingua principale
Python
Stelle
2.5k
Fork
1.5k
Merge medio
2g 17h
PR unite (30g)
2

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di exercism/python

Tutte le issue di exercism/python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.