summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pyparsing/core.py1
-rw-r--r--tests/test_unit.py5
2 files changed, 5 insertions, 1 deletions
diff --git a/pyparsing/core.py b/pyparsing/core.py
index d865283..608d607 100644
--- a/pyparsing/core.py
+++ b/pyparsing/core.py
@@ -1992,7 +1992,6 @@ class Keyword(Token):
def copy(self):
c = super().copy()
- c.identChars = Keyword.DEFAULT_KEYWORD_CHARS
return c
@staticmethod
diff --git a/tests/test_unit.py b/tests/test_unit.py
index 42a6c73..32677f6 100644
--- a/tests/test_unit.py
+++ b/tests/test_unit.py
@@ -5983,6 +5983,11 @@ class Test2_WithoutPackrat(ppt.TestParseResultsAsserts, TestCase):
False, "failed to match keyword using updated keyword chars"
)
+ def testKeywordCopyIdentChars(self):
+ a_keyword = pp.Keyword("start", identChars="_")
+ b_keyword = a_keyword.copy()
+ self.assertEqual(a_keyword.identChars, b_keyword.identChars)
+
def testLiteralVsKeyword(self):
integer = ppc.integer