Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,22 @@ In my case I'm using Python 3 with Windows, so I fire up my command
shell (cmd.exe) and run this:

.. image:: https://user-images.githubusercontent.com/2614930/28401747-f723ff00-6cd0-11e7-9b9a-a6993b753cf6.png
Skipping to a Specific Lesson
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you have already completed earlier koans or want to work on a specific
lesson, you can start the koans from that lesson by passing the lesson name as
an argument.

For example::

python contemplate_koans.py about_strings

or:

python3 contemplate_koans.py about_strings

This starts the koans from ``about_strings`` instead of the first lesson.
Apparently a test failed::

AssertionError: False is not True
Expand Down Expand Up @@ -228,13 +243,12 @@ https://github.com/mswell/python_koans_br
Acknowledgments
---------------

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!
Thanks to **Jim Weirich** and **Joe O'Brien** for creating the original **Ruby Koans**, which inspired **Python Koans**. Ruby Koans itself was inspired by **Metakoans**, so special thanks also go to **Ara Howard** for that foundation.

A heartfelt thank you to everyone who has contributed to **Python Koans** over the years. This project benefited greatly from the work started by the talented team at **FPIP**, giving it an excellent foundation to build upon.

If you're interested in learning more, be sure to check out the FPIP team's excellent Python podcast!

Also thanks to everyone who has contributed to Python Koans! I got a great
headstart by taking over a code base initiated by the combined Mikes of
FPIP. So here's a little plug for their very cool Python podcast:

* https://www.frompythonimportpodcast.com/

Expand Down
13 changes: 9 additions & 4 deletions koans/about_strings.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-



from runner.koan import *

class AboutStrings(Koan):
Expand All @@ -26,12 +28,15 @@ def test_raw_strings_are_also_strings(self):
self.assertEqual(__, isinstance(string, str))

def test_use_single_quotes_to_create_string_with_double_quotes(self):
string = 'He said, "Go Away."'
self.assertEqual(__, string)
single_quoted = 'He said, "Go Away."'
double_quoted = "He said, \"Go Away.\""
self.assertEqual(__, single_quoted == double_quoted)

def test_use_double_quotes_to_create_strings_with_single_quotes(self):
string = "Don't"
self.assertEqual(__, string)
double_quoted = "Don't"
single_quoted = 'Don\'t'

self.assertEqual(__, single_quoted == double_quoted)

def test_use_backslash_for_escaping_quotes_in_strings(self):
a = "He said, \"Don't\""
Expand Down