summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Plant <L.Plant.98@cantab.net>2012-06-14 23:10:51 +0100
committerLuke Plant <L.Plant.98@cantab.net>2012-06-14 23:12:15 +0100
commitfd6a9d35d9034436d2f8092717c5b210da6ff6ce (patch)
tree2a0ef5e61cf9db2b4d0fd6e3da928547783c6a1c
parentedee20ff506779b7a7d4e10321a0a619ce0eb03d (diff)
IfParser.next() method renamed to avoid confusion with iterator protocol.
-rw-r--r--django/template/smartif.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/django/template/smartif.py b/django/template/smartif.py
index 54d74b4e25..e2ca3959a2 100644
--- a/django/template/smartif.py
+++ b/django/template/smartif.py
@@ -165,7 +165,7 @@ class IfParser(object):
self.tokens = mapped_tokens
self.pos = 0
- self.current_token = self.next()
+ self.current_token = self.next_token()
def translate_token(self, token):
try:
@@ -175,7 +175,7 @@ class IfParser(object):
else:
return op()
- def next(self):
+ def next_token(self):
if self.pos >= len(self.tokens):
return EndToken
else:
@@ -193,11 +193,11 @@ class IfParser(object):
def expression(self, rbp=0):
t = self.current_token
- self.current_token = self.next()
+ self.current_token = self.next_token()
left = t.nud(self)
while rbp < self.current_token.lbp:
t = self.current_token
- self.current_token = self.next()
+ self.current_token = self.next_token()
left = t.led(left, self)
return left