Skip to content

Commit

Permalink
return self from TS.__i*__() and TS.globformat()
Browse files Browse the repository at this point in the history
Signed-off-by: Chris “Kwpolska” Warrick <[email protected]>
  • Loading branch information
Kwpolska committed Feb 21, 2014
1 parent 2a2ab2c commit 22912c8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nikola/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ def format(self, *args, **kwargs):
def globformat(self, *args, **kwargs):
for k in self.values:
self.values[k] = self.values[k].format(*args, **kwargs)
return self

def __add__(self, other):
return self() + other
Expand All @@ -306,6 +307,7 @@ def __radd__(self, other):
def __iadd__(self, other):
for k in self.values:
self.values[k] = self.values[k] + other
return self

def __mul__(self, other):
return self() * other
Expand All @@ -316,6 +318,7 @@ def __rmul__(self, other):
def __imul__(self, other):
for k in self.values:
self.values[k] = self.values[k] * other
return self

def __mod__(self, other):
return self() % other
Expand All @@ -326,6 +329,7 @@ def __rmod__(self, other):
def __imod__(self, other):
for k in self.values:
self.values[k] = self.values[k] % other
return self

def __len__(self):
return self().__len__()
Expand Down

0 comments on commit 22912c8

Please sign in to comment.