summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo <hugovk@users.noreply.github.com>2018-08-09 16:55:29 +0300
committerGitHub <noreply@github.com>2018-08-09 16:55:29 +0300
commitaf1fd83ca86312d456da846e379f913f07f794e9 (patch)
tree430138b65103d23b580667e6542356d1170698f3
parent8da759898768311ad3a67a1963d6132f138469a1 (diff)
downloadpyparsing-git-af1fd83ca86312d456da846e379f913f07f794e9.tar.gz
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: