From f072becd5c4678c6acd3268d0c9897f09bbca6e6 Mon Sep 17 00:00:00 2001 From: "[Arjav Jain]" <[arjav9191@gmail.com]> Date: Sun, 28 Jun 2026 23:55:59 +0530 Subject: [PATCH 1/3] Improve clarity of string quoting koans --- koans/about_strings.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/koans/about_strings.py b/koans/about_strings.py index 25f5f59df..fe77538e7 100644 --- a/koans/about_strings.py +++ b/koans/about_strings.py @@ -1,6 +1,8 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +from pymupdf import _self + from runner.koan import * class AboutStrings(Koan): @@ -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\"" From 59a81d80f482854ff269972836775f9169e2849c Mon Sep 17 00:00:00 2001 From: "[Arjav Jain]" <[arjav9191@gmail.com]> Date: Wed, 1 Jul 2026 03:39:44 +0530 Subject: [PATCH 2/3] Add documentation for skipping to a specific lesson --- README.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.rst b/README.rst index e2f303fe9..ac95a31e5 100644 --- a/README.rst +++ b/README.rst @@ -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 From ed62930d31ca163051251dce4b875b5e8e7fef23 Mon Sep 17 00:00:00 2001 From: "[Arjav Jain]" <[arjav9191@gmail.com]> Date: Wed, 1 Jul 2026 03:43:26 +0530 Subject: [PATCH 3/3] Fix import issue and add documentation for skipping lessons --- koans/about_strings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koans/about_strings.py b/koans/about_strings.py index fe77538e7..5e11917ce 100644 --- a/koans/about_strings.py +++ b/koans/about_strings.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -from pymupdf import _self + from runner.koan import *