Skip to content

Commit edc86ab

Browse files
committed
Modernized the koan links at the end of the README
1 parent 0bc0f6f commit edc86ab

File tree

1 file changed

+55
-35
lines changed

1 file changed

+55
-35
lines changed

README.rst

Lines changed: 55 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
Python Koans
33
============
44

5-
Python Koans is a port of Edgecase's "Ruby Koans" which can be found at http://rubykoans.com/.
5+
Python Koans is a port of Edgecase's "Ruby Koans" which can be found
6+
at http://rubykoans.com/.
67

78
.. image:: http://i442.photobucket.com/albums/qq150/gregmalcolm/PythonKoansScreenshot.png
89

9-
Python Koans is an interactive tutorial for learning the Python programming language by making tests pass.
10+
Python Koans is an interactive tutorial for learning the Python programming
11+
language by making tests pass.
1012

1113
Most tests are 'fixed' by filling the missing parts of assert functions. Eg:
1214

@@ -16,9 +18,13 @@ which can be fixed by replacing the __ part with the appropriate code:
1618

1719
self.assertEqual(3, 1+2)
1820

19-
Occasionally you will encounter some failing tests that are already filled out. In these cases you will need to finish implementing some code to progress. For example, there is an exercise for writing some code that will tell you if a triangle is equilateral, isosceles or scalene.
21+
Occasionally you will encounter some failing tests that are already filled out.
22+
In these cases you will need to finish implementing some code to progress. For
23+
example, there is an exercise for writing some code that will tell you if a
24+
triangle is equilateral, isosceles or scalene.
2025

21-
As well as being a great way to learn some Python, it is also a good way to get a taste of Test Driven Development (TDD).
26+
As well as being a great way to learn some Python, it is also a good way to get
27+
a taste of Test Driven Development (TDD).
2228

2329

2430
Downloading Python Koans
@@ -38,26 +44,33 @@ Either site will allow you to download the source as a zip/gz/bz2.
3844
Installing Python Koans
3945
-----------------------
4046

41-
Aside from downloading or checking out the latest version of Python Koans, you need to install the Python interpreter.
47+
Aside from downloading or checking out the latest version of Python Koans, you
48+
need to install the Python interpreter.
4249

4350
At this time of writing, there are two versions of the Python Koans:
4451

4552
* one for use with Python 2.6 (it also works with Python 2.7)
46-
* one for Python 3.1.
53+
* one for Python 3.1.
4754

48-
You should be able to work with newer Python versions, but older ones will likely give you problems.
55+
You should be able to work with newer Python versions, but older ones will
56+
likely give you problems.
4957

5058
You can download Python from here:
5159

5260
http://www.python.org/download
5361

54-
After installing Python make sure the folder containing the python executable is in the system path. In other words, you need to be able to be able to run Python from a command console. With Python 2 it will be called 'python' or 'python.exe' depending on the operating system. For Python 3 it will either be 'python3' or for windows it will be 'python.exe'.
62+
After installing Python make sure the folder containing the python executable
63+
is in the system path. In other words, you need to be able to be able to run
64+
Python from a command console. With Python 2 it will be called 'python'
65+
or 'python.exe' depending on the operating system. For Python 3 it will either
66+
be 'python3' or for windows it will be 'python.exe'.
5567

5668
If you have problems, this may help:
5769

5870
http://www.python.org/about/gettingstarted
5971

60-
Windows users may also want to update the line in the batch file run.bat to set the python path:
72+
Windows users may also want to update the line in the batch file run.bat to
73+
set the python path:
6174

6275
SET PYTHON_PATH=C:\Python27
6376

@@ -71,25 +84,30 @@ http://www.youtube.com/watch?v=e2WXgXEjbHY&list=PL5Up_u-XkWgNcunP_UrTJG_3EXgbK2B
7184

7285
Or if you prefer to read:
7386

74-
From a *nix terminal or windows command prompt go to the python koans\python_VERSION folder and run::
87+
From a *nix terminal or windows command prompt go to the python
88+
koans\python_VERSION folder and run::
7589
7690
python contemplate_koans.py
7791

7892
or::
7993

8094
python3 contemplate_koans.py
8195

82-
In my case I'm using Python 3 with windows, so I fire up my command shell (cmd.exe) and run this:
96+
In my case I'm using Python 3 with windows, so I fire up my command
97+
shell (cmd.exe) and run this:
8398

8499
.. image:: http://i442.photobucket.com/albums/qq150/gregmalcolm/GettingStarted.png
85100

86101
Apparently a test failed::
87102

88103
AssertionError: False is not True
89104

90-
It also tells me exactly where the problem in, its an assert on line 12 of .\koans\about_asserts.py. This one is easy, just change False to True to make the test pass.
105+
It also tells me exactly where the problem in, its an assert on line 12
106+
of .\koans\about_asserts.py. This one is easy, just change False to True to
107+
make the test pass.
91108

92-
Sooner or later you will likely encounter tests where you are not sure what the expected value should be. For example::
109+
Sooner or later you will likely encounter tests where you are not sure what the
110+
expected value should be. For example::
93111

94112
class Dog:
95113
pass
@@ -98,7 +116,8 @@ Sooner or later you will likely encounter tests where you are not sure what the
98116
fido = self.Dog()
99117
self.assertEqual(__, isinstance(fido, object))
100118

101-
This is where the Python Command Line can come in handy. in this case I can fire up the command line, recreate the scenario and run queries:
119+
This is where the Python Command Line can come in handy. in this case I can
120+
fire up the command line, recreate the scenario and run queries:
102121

103122
.. image:: http://i442.photobucket.com/albums/qq150/gregmalcolm/DebuggingPython.png
104123

@@ -120,38 +139,39 @@ Quoting the Ruby Koans instructions::
120139
Content
121140
-------
122141

123-
The Python Koans is a made up of about 2/3 Ruby Koans ported material and 1/3 Python specific tests. The content ported from Ruby Koans includes all the assignment projects.
142+
The Python Koans is a made up of about 2/3 Ruby Koans ported material and 1/3
143+
Python specific tests. The content ported from Ruby Koans includes all the
144+
assignment projects.
124145

125-
Content for Python 3 is a little different to the Python 2 flavor due to big changes between the two different versions of the language. For example, in the Python 2 variant the differences between old and new style classes are covered. This loses relevance in in the Python 3 version, but there are some extra tests covering new functionality.
146+
Content for Python 3 is a little different to the Python 2 flavor due to big
147+
changes between the two different versions of the language. For example, in
148+
the Python 2 variant the differences between old and new style classes are
149+
covered. This loses relevance in in the Python 3 version, but there are some
150+
extra tests covering new functionality.
126151

127152

128153
Finding More Koan Projects
129154
--------------------------
130155

131-
Right now there are a lot of spinoff Koan projects out there for a great number of languages and frameworks. Many of them do not have that much content, but contributing to them is a great way to learn. At the moment, most of them can be found by searching for 'koans' on github.
156+
There are number of other great Koan projects out there for various languages
157+
and frameworks. Most of them can be found in github. Also there is a little
158+
koans activity on bitbucket.
132159

133-
A couple of promising projects include:
134-
135-
* C# Koans - https://bitbucket.org/srtsolutions/csharpkoans
136-
Mentioned here: http://labs.srtsolutions.com/c-koans
137-
138-
* F# Koans - https://github.com/ChrisMarinos/FSharpKoans
139-
Mentioned here: http://labs.srtsolutions.com/f-koans
140-
141-
* Scala Koans - http://scalakoans.org/
142-
Mentioned here: http://labs.srtsolutions.com/koans
143-
144-
* DotNetKoans - https://github.com/CoryFoy/DotNetKoans
145-
Mentioned here: http://blog.coryfoy.com/2009/12/dotnet-koans/
146-
147-
* TestMongoKoans.
160+
* Github koan projects:
161+
https://github.com/search?q=koans&ref=cmdform
148162

163+
* Bitbucket koan projects:
164+
https://bitbucket.org/repo/all?name=koans
149165

150166
Acknowledgments
151167
---------------
152168

153-
Thanks go to Jim Weirich and Joe O'Brien for the original Ruby Koans that the Python Koans is based on! Also the Ruby Koans in turn borrows from Metakoans so thanks also go to Ara Howard for that!
169+
Thanks go to Jim Weirich and Joe O'Brien for the original Ruby Koans that the
170+
Python Koans is based on! Also the Ruby Koans in turn borrows from Metakoans
171+
so thanks also go to Ara Howard for that!
154172

155-
Also thanks to everyone who helped with the Python Koans conversion! In particular I got a great headstart on the project by forking from this Python Koans startup project:
173+
Also thanks to everyone who has contributed to Python Koans! I got a great
174+
headstart by taking over a code base initiated by the combined Mikes of
175+
FPIP. So here's a little plug for their very cool Python podcast:
156176

157-
http://bitbucket.org/mcrute/python_koans/
177+
http://frompythonimportpodcast.com/

0 commit comments

Comments
 (0)