Skip to content

Commit 9b90c2c

Browse files
committed
Support bytes verbatim rules in Variable.is_reference_rule
1 parent 6c68969 commit 9b90c2c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

khiops/core/dictionary.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,8 +1156,15 @@ def is_reference_rule(self):
11561156
bool
11571157
``True`` if the special reference rule is used.
11581158
"""
1159-
1160-
return self.rule and self.rule[0] == "["
1159+
if self.rule:
1160+
if isinstance(self.rule, str):
1161+
if self.rule[0] == "[":
1162+
return True
1163+
else:
1164+
assert isinstance(self.rule, bytes)
1165+
if self.rule[0] == b"[":
1166+
return True
1167+
return False
11611168

11621169
def full_type(self):
11631170
"""Returns the variable's full type

0 commit comments

Comments
 (0)