summaryrefslogtreecommitdiffstats
path: root/scintilla/test/examples/x.py
diff options
context:
space:
mode:
Diffstat (limited to 'scintilla/test/examples/x.py')
-rw-r--r--scintilla/test/examples/x.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/scintilla/test/examples/x.py b/scintilla/test/examples/x.py
new file mode 100644
index 0000000..7e577dd
--- /dev/null
+++ b/scintilla/test/examples/x.py
@@ -0,0 +1,11 @@
+# Convert all punctuation characters except '_', '*', and '.' into spaces.
+def depunctuate(s):
+ '''A docstring'''
+ """Docstring 2"""
+ d = ""
+ for ch in s:
+ if ch in 'abcde':
+ d = d + ch
+ else:
+ d = d + " "
+ return d