Permalink
Browse files

IfParser.next() method renamed to avoid confusion with iterator proto…

…col.
  • Loading branch information...
spookylukey committed Jun 14, 2012
1 parent edee20f commit fd6a9d35d9034436d2f8092717c5b210da6ff6ce
Showing with 4 additions and 4 deletions.
  1. +4 −4 django/template/smartif.py
@@ -165,7 +165,7 @@ def __init__(self, tokens):
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 @@ def translate_token(self, token):
else:
return op()
- def next(self):
+ def next_token(self):
if self.pos >= len(self.tokens):
return EndToken
else:
@@ -193,11 +193,11 @@ def parse(self):
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

0 comments on commit fd6a9d3

Please sign in to comment.