From 1b2fc2bda44e67ea3a57ea010d8ededbdb593af9 Mon Sep 17 00:00:00 2001 From: julienmalard Date: Tue, 10 Nov 2020 16:05:32 -0500 Subject: [PATCH] Code review #2 --- lark/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lark/utils.py b/lark/utils.py index 498a12a..29fa514 100644 --- a/lark/utils.py +++ b/lark/utils.py @@ -16,7 +16,7 @@ logger.setLevel(logging.CRITICAL) def is_id_continue(x): """ Checks if all characters in `x` are alphanumeric characters (Unicode standard, so diactrics, Indian vowels, non-latin - numbers, etc. all pass). Synonymous with a Python `ID_CONTINUE` identifier. + numbers, etc. all pass). Synonymous with a Python `ID_CONTINUE` identifier. See PEP 3131 for details. """ if len(x) != 1: return all(is_id_continue(y) for y in x) @@ -24,6 +24,7 @@ def is_id_continue(x): def isalpha(x): + """See PEP 3131 for details.""" if len(x) != 1: return all(isalpha(y) for y in x) return unicodedata.category(x) in ['Lu', 'Ll', 'Lt', 'Lm', 'Lo', 'Mn', 'Mc', 'Pc']