def save(self, *args, **kwargs):
        if self.request.user.is_anonymous():
            self.instance.author_ip = self.request.META['REMOTE_ADDR']
        else:
            self.instance.author = self.request.user
        
        if not self.page.pk:
            self.page.save()
        self.instance.page = self.page
        
        text, created = Text.objects.get_or_create(content=self.cleaned_data['text'])
        self.instance.text = text
        
        self.instance.comment = self.cleaned_data['comment']
        
        if not created:
            try:
                revision = text.revision_set.latest('pub_date')
                self.instance.comment = {'revision':revision.pk, 'author':revision.author or revision.author_ip} % _(u'Reverted to revision %(revision)s by %(author)s')
            except ObjectDoesNotExist:
                pass
        
        self.instance.save()
dataset/ETHPy150Open kylef-archive/lithium/lithium/wiki/forms.py/EditForm.save/swapped operands of `%`