diff options
author | ptmcg <ptmcg@austin.rr.com> | 2022-06-16 07:39:35 -0500 |
---|---|---|
committer | ptmcg <ptmcg@austin.rr.com> | 2022-06-16 07:39:35 -0500 |
commit | 6dcf9aad746d0f3ca873fa1c023f36819bf0b6df (patch) | |
tree | bfede886d757be277118fb8bcfa6fc887b93e87b /pyparsing/common.py | |
parent | 9c39a15cb42486bbbee828268d80cef3fe362df3 (diff) | |
download | pyparsing-git-6dcf9aad746d0f3ca873fa1c023f36819bf0b6df.tar.gz |
Clean up docstrings to use new PEP8 names instead of old camelCase names
Diffstat (limited to 'pyparsing/common.py')
-rw-r--r-- | pyparsing/common.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pyparsing/common.py b/pyparsing/common.py index 9b52ed0..bb8472a 100644 --- a/pyparsing/common.py +++ b/pyparsing/common.py @@ -260,8 +260,8 @@ class pyparsing_common: Example:: date_expr = pyparsing_common.iso8601_date.copy() - date_expr.setParseAction(pyparsing_common.convertToDate()) - print(date_expr.parseString("1999-12-31")) + date_expr.set_parse_action(pyparsing_common.convert_to_date()) + print(date_expr.parse_string("1999-12-31")) prints:: @@ -287,8 +287,8 @@ class pyparsing_common: Example:: dt_expr = pyparsing_common.iso8601_datetime.copy() - dt_expr.setParseAction(pyparsing_common.convertToDatetime()) - print(dt_expr.parseString("1999-12-31T23:59:59.999")) + dt_expr.set_parse_action(pyparsing_common.convert_to_datetime()) + print(dt_expr.parse_string("1999-12-31T23:59:59.999")) prints:: @@ -326,9 +326,9 @@ class pyparsing_common: # strip HTML links from normal text text = '<td>More info at the <a href="https://github.com/pyparsing/pyparsing/wiki">pyparsing</a> wiki page</td>' - td, td_end = makeHTMLTags("TD") - table_text = td + SkipTo(td_end).setParseAction(pyparsing_common.stripHTMLTags)("body") + td_end - print(table_text.parseString(text).body) + td, td_end = make_html_tags("TD") + table_text = td + SkipTo(td_end).set_parse_action(pyparsing_common.strip_html_tags)("body") + td_end + print(table_text.parse_string(text).body) Prints:: |