diff --git a/pattern/text/tree.py b/pattern/text/tree.py index 11fee24f..29563fbb 100644 --- a/pattern/text/tree.py +++ b/pattern/text/tree.py @@ -686,7 +686,7 @@ def anchors(self): @property def is_question(self): - return len(self) > 0 and str(self[-1]) == "?" + return len(self) > 0 and str(self.string[-1]) == "?" @property def is_exclamation(self): return len(self) > 0 and str(self[-1]) == "!" @@ -1712,4 +1712,4 @@ def outline(column, fill=1, padding=3, align="left"): del columns[6] # Create a string with one row (i.e., one token) per line. return "\n".join(["".join([x[i] for x in columns]) for i in range(len(columns[0]))]) - \ No newline at end of file +