From: noah morrison Date: Sat, 15 Nov 2014 03:02:14 +0000 (-0500) Subject: Use endswith instead of splicing X-Git-Url: https://git.devinivas.org/?a=commitdiff_plain;h=48b870b0a1c101e13d55b4ffbd5ccfac8ea00ee0;p=chevron.git Use endswith instead of splicing --- 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()