@@ -13,7 +13,7 @@ at http://rubykoans.com/.
13
13
Python Koans is an interactive tutorial for learning the Python programming
14
14
language by making tests pass.
15
15
16
- Most tests are ' fixed' by filling the missing parts of assert functions. Eg:
16
+ Most tests are * fixed * by filling the missing parts of assert functions. Eg:
17
17
18
18
self.assertEqual(__, 1+2)
19
19
@@ -53,7 +53,7 @@ need to install the Python interpreter.
53
53
At this time of writing, there are two versions of the Python Koans:
54
54
55
55
* one for use with Python 2.7 (earlier versions are no longer supported)
56
- * one for Python 3.1+.
56
+ * one for Python 3.1+
57
57
58
58
You should be able to work with newer Python versions, but older ones will
59
59
likely give you problems.
@@ -64,16 +64,16 @@ You can download Python from here:
64
64
65
65
After installing Python make sure the folder containing the python executable
66
66
is in the system path. In other words, you need to be able to be able to run
67
- Python from a command console. With Python 2 it will be called ' python'
68
- or ' python.exe' depending on the operating system. For Python 3 it will either
69
- be ' python3' or for windows it will be ' python.exe' .
67
+ Python from a command console. With Python 2 it will be called ` python `
68
+ or ` python.exe ` depending on the operating system. For Python 3 it will either
69
+ be ` python3 ` or for windows it will be ` python.exe ` .
70
70
71
71
If you have problems, this may help:
72
72
73
73
http://www.python.org/about/gettingstarted
74
74
75
- Windows users may also want to update the line in the batch file run.bat to
76
- set the python path:
75
+ Windows users may also want to update the line in the batch file ` run.bat ` to
76
+ set the python path::
77
77
78
78
SET PYTHON_PATH=C:\Python27
79
79
@@ -87,8 +87,8 @@ http://www.youtube.com/watch?v=e2WXgXEjbHY&list=PL5Up_u-XkWgNcunP_UrTJG_3EXgbK2B
87
87
88
88
Or if you prefer to read:
89
89
90
- From a *nix terminal or windows command prompt go to the python
91
- koans\p ython_VERSION folder and run::
90
+ From a \ * nix terminal or windows command prompt go to the python
91
+ koans\\ python_VERSION folder and run::
92
92
93
93
python contemplate_koans.py
94
94
@@ -106,7 +106,7 @@ Apparently a test failed::
106
106
AssertionError: False is not True
107
107
108
108
It also tells me exactly where the problem in, its an assert on line 12
109
- of .\k oans\a bout_asserts.py. This one is easy, just change False to True to
109
+ of .\\ koans\ \ about_asserts.py. This one is easy, just change False to True to
110
110
make the test pass.
111
111
112
112
Sooner or later you will likely encounter tests where you are not sure what the
@@ -119,7 +119,7 @@ expected value should be. For example::
119
119
fido = self.Dog()
120
120
self.assertEqual(__, isinstance(fido, object))
121
121
122
- This is where the Python Command Line can come in handy. in this case I can
122
+ This is where the Python Command Line can come in handy. In this case I can
123
123
fire up the command line, recreate the scenario and run queries:
124
124
125
125
.. image :: http://i442.photobucket.com/albums/qq150/gregmalcolm/DebuggingPython.png
@@ -133,7 +133,7 @@ Quoting the Ruby Koans instructions::
133
133
"In test-driven development the mantra has always been, red, green,
134
134
refactor. Write a failing test and run it (red), make the test pass
135
135
(green), then refactor it (that is look at the code and see if you
136
- can make it any better. In this case you will need to run the koan
136
+ can make it any better) . In this case you will need to run the koan
137
137
and see it fail (red), make the test pass (green), then take a
138
138
moment and reflect upon the test to see what it is teaching you
139
139
and improve the code to better communicate its intent (refactor)."
0 commit comments