aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexilla/test/examples/python/x.py
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2019-12-14 08:17:00 +1100
committerNeil <nyamatongwe@gmail.com>2019-12-14 08:17:00 +1100
commit4f1b30ebe70a6475ffeca1ce2c0dc48c8e70a5f9 (patch)
treec2cb66991d89802a7a8b18bde9aa486da5fc9614 /lexilla/test/examples/python/x.py
parent651e4b440ad3019a63b10d972ee36a296020e2c8 (diff)
downloadscintilla-mirror-4f1b30ebe70a6475ffeca1ce2c0dc48c8e70a5f9.tar.gz
Lexilla tests.
Diffstat (limited to 'lexilla/test/examples/python/x.py')
-rw-r--r--lexilla/test/examples/python/x.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/lexilla/test/examples/python/x.py b/lexilla/test/examples/python/x.py
new file mode 100644
index 000000000..12c4b71df
--- /dev/null
+++ b/lexilla/test/examples/python/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