summaryrefslogtreecommitdiff
path: root/trunk/src/examples/commasep.py
diff options
context:
space:
mode:
authorptmcg <ptmcg@9bf210a0-9d2d-494c-87cf-cfb32e7dff7b>2016-08-09 21:50:19 +0000
committerptmcg <ptmcg@9bf210a0-9d2d-494c-87cf-cfb32e7dff7b>2016-08-09 21:50:19 +0000
commit0b19bb71ba5a4afa84e673a8239935426fa0db23 (patch)
treee9abae9c616fdfdfebd9a8a0931d8f21824f30d2 /trunk/src/examples/commasep.py
parentb2c3ade75384efe76b8774b607e17fe98fab92ef (diff)
downloadpyparsing-0b19bb71ba5a4afa84e673a8239935426fa0db23.tar.gz
Remove incorrect tag directorypyparsing_2.1.6
git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/tags/pyparsing_2.1.6@405 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
Diffstat (limited to 'trunk/src/examples/commasep.py')
-rw-r--r--trunk/src/examples/commasep.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/trunk/src/examples/commasep.py b/trunk/src/examples/commasep.py
deleted file mode 100644
index 7696871..0000000
--- a/trunk/src/examples/commasep.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# commasep.py
-#
-# comma-separated list example, to illustrate the advantages of using
-# the pyparsing commaSeparatedList as opposed to string.split(","):
-# - leading and trailing whitespace is implicitly trimmed from list elements
-# - list elements can be quoted strings, which can safely contain commas without breaking
-# into separate elements
-
-from pyparsing import commaSeparatedList
-
-testData = [
- "a,b,c,100.2,,3",
- "d, e, j k , m ",
- "'Hello, World', f, g , , 5.1,x",
- "John Doe, 123 Main St., Cleveland, Ohio",
- "Jane Doe, 456 St. James St., Los Angeles , California ",
- "",
- ]
-
-for line in testData:
- print(commaSeparatedList.parseString(line))
- print(line.split(","))
- print()