From 4a23652cd634ba651d85f0e97de22b60e2d3eb2f Mon Sep 17 00:00:00 2001 From: arsalansaad Date: Sat, 9 Sep 2017 20:52:56 +0530 Subject: [PATCH] Fix #130 is_question fixed --- pattern/text/tree.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 +