summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul McGuire <ptmcg@users.noreply.github.com>2018-08-21 05:53:27 -0500
committerGitHub <noreply@github.com>2018-08-21 05:53:27 -0500
commit5e17b30eb0798dd1c8bc016addcbdc7e83372429 (patch)
treea69f39595a5d64f108f6c0f13d9ba01cdf3933b7
parent2bafc9a2e04398da8d01d708c312243af822ce32 (diff)
parentaf1fd83ca86312d456da846e379f913f07f794e9 (diff)
downloadpyparsing-git-5e17b30eb0798dd1c8bc016addcbdc7e83372429.tar.gz
Merge pull request #18 from hugovk/patch-3
README: Use Python code formatting
-rw-r--r--README.md10
1 files changed, 6 insertions, 4 deletions
diff --git a/README.md b/README.md
index 8374854..4326ce2 100644
--- a/README.md
+++ b/README.md
@@ -12,10 +12,12 @@ that client code uses to construct the grammar directly in Python code.
Here is a program to parse "Hello, World!" (or any greeting of the form
"salutation, addressee!"):
- from pyparsing import Word, alphas
- greet = Word( alphas ) + "," + Word( alphas ) + "!"
- hello = "Hello, World!"
- print hello, "->", greet.parseString( hello )
+```python
+from pyparsing import Word, alphas
+greet = Word( alphas ) + "," + Word( alphas ) + "!"
+hello = "Hello, World!"
+print hello, "->", greet.parseString( hello )
+```
The program outputs the following: