Skip to content

Commit c8fbe9e

Browse files
committed
Update identifier name pattern to match Core
The first character can also be an underscore.
1 parent 9b90c2c commit c8fbe9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

khiops/core/dictionary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def _format_name(name):
5050
# Python isalnum is not used because of utf-8 encoding (accentuated chars
5151
# are considered alphanumeric)
5252
# Return original name if is an identifier, otherwise between backquotes
53-
identifier_pattern = r"^[a-zA-Z][a-zA-Z0-9_]*"
53+
identifier_pattern = r"^[a-zA-Z_][a-zA-Z0-9_]*"
5454
str_identifier_regex = re.compile(identifier_pattern)
5555
bytes_identifier_regex = re.compile(bytes(identifier_pattern, encoding="ascii"))
5656
if isinstance(name, str):

0 commit comments

Comments
 (0)