From 48b870b0a1c101e13d55b4ffbd5ccfac8ea00ee0 Mon Sep 17 00:00:00 2001 From: noah morrison Date: Fri, 14 Nov 2014 22:02:14 -0500 Subject: [PATCH] Use endswith instead of splicing --- entei.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entei.py b/entei.py index 0958f3e..c1e218d 100755 --- a/entei.py +++ b/entei.py @@ -45,7 +45,7 @@ def tokenize(template): until = until or l_del literal = get() while not template.is_finished: - if literal[-len(until):] == until: + if literal.endswith(until): return literal[:-len(until)] literal += get() -- 2.47.3