Skip to content

Commit 23aaeaf

Browse files
author
Katrina Owen
committed
Inline the exercise README insert into the template
Now that we have a template we don't need to have a separate README insert.
1 parent 2050602 commit 23aaeaf

115 files changed

Lines changed: 27 additions & 165 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

config/exercise_readme.go.tmpl

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,29 @@
44
{{- with .Hints }}
55
{{ . }}
66
{{ end }}
7-
{{- with .TrackInsert }}
8-
{{ . }}
9-
{{ end }}
10-
{{- with .Spec.Credits -}}
7+
## Exception messages
8+
9+
Sometimes it is necessary to raise an exception. When you do this, you should include a meaningful error message to
10+
indicate what the source of the error is. This makes your code more readable and helps significantly with debugging. Not
11+
every exercise will require you to raise an exception, but for those that do, the tests will only pass if you include
12+
a message.
13+
14+
To raise a message with an exception, just write it as an argument to the exception type. For example, instead of
15+
`raise Exception`, you shold write:
16+
17+
```python
18+
raise Exception("Meaningful message indicating the source of the error")
19+
```
20+
21+
## Submitting Exercises
22+
23+
Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
24+
25+
For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.
26+
27+
For more detailed information about running tests, code style and linting,
28+
please see the [help page](http://exercism.io/languages/python).
29+
{{ with .Spec.Credits }}
1130
## Source
1231

1332
{{ . }}

docs/EXERCISE_README_INSERT.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

exercises/accumulate/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ To raise a message with an exception, just write it as an argument to the except
3939
raise Exception("Meaningful message indicating the source of the error")
4040
```
4141

42-
4342
## Submitting Exercises
4443

4544
Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.

exercises/acronym/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ To raise a message with an exception, just write it as an argument to the except
2121
raise Exception("Meaningful message indicating the source of the error")
2222
```
2323

24-
2524
## Submitting Exercises
2625

2726
Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.

exercises/all-your-base/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ To raise a message with an exception, just write it as an argument to the except
4545
raise Exception("Meaningful message indicating the source of the error")
4646
```
4747

48-
4948
## Submitting Exercises
5049

5150
Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
@@ -55,6 +54,5 @@ For example, if you're submitting `bob.py` for the Bob exercise, the submit comm
5554
For more detailed information about running tests, code style and linting,
5655
please see the [help page](http://exercism.io/languages/python).
5756

58-
5957
## Submitting Incomplete Solutions
6058
It's possible to submit an incomplete solution so you can see how others have completed the exercise.

exercises/allergies/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ To raise a message with an exception, just write it as an argument to the except
4343
raise Exception("Meaningful message indicating the source of the error")
4444
```
4545

46-
4746
## Submitting Exercises
4847

4948
Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.

exercises/alphametics/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ To raise a message with an exception, just write it as an argument to the except
4545
raise Exception("Meaningful message indicating the source of the error")
4646
```
4747

48-
4948
## Submitting Exercises
5049

5150
Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
@@ -55,6 +54,5 @@ For example, if you're submitting `bob.py` for the Bob exercise, the submit comm
5554
For more detailed information about running tests, code style and linting,
5655
please see the [help page](http://exercism.io/languages/python).
5756

58-
5957
## Submitting Incomplete Solutions
6058
It's possible to submit an incomplete solution so you can see how others have completed the exercise.

exercises/anagram/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ To raise a message with an exception, just write it as an argument to the except
2020
raise Exception("Meaningful message indicating the source of the error")
2121
```
2222

23-
2423
## Submitting Exercises
2524

2625
Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.

exercises/armstrong-numbers/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ To raise a message with an exception, just write it as an argument to the except
2525
raise Exception("Meaningful message indicating the source of the error")
2626
```
2727

28-
2928
## Submitting Exercises
3029

3130
Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.

exercises/atbash-cipher/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ To raise a message with an exception, just write it as an argument to the except
4242
raise Exception("Meaningful message indicating the source of the error")
4343
```
4444

45-
4645
## Submitting Exercises
4746

4847
Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.

0 commit comments

Comments
 (0)