diff --git a/django/utils/functional.py b/django/utils/functional.py
index 085a8fc..ad64802 100644
|
a
|
b
|
|
| 1 | 1 | import copy |
| | 2 | import inspect |
| 2 | 3 | import operator |
| 3 | 4 | from functools import wraps, update_wrapper |
| | 5 | import re |
| 4 | 6 | import sys |
| 5 | 7 | |
| 6 | 8 | from django.utils import six |
| … |
… |
def lazy(func, *resultclasses):
|
| 153 | 155 | __hash__ = object.__hash__ |
| 154 | 156 | |
| 155 | 157 | def __mod__(self, rhs): |
| | 158 | if len(inspect.getargspec(func)[0]) > len(self.__args) and isinstance(rhs, dict): |
| | 159 | # Complete missing argument by looking for '%(var)d' in rhs, |
| | 160 | # used mainly by ungettext_lazy |
| | 161 | m = re.search('%\(([^)]*)\)d', self.__args[0]) |
| | 162 | key = m.groups()[0] if m else None |
| | 163 | if key and key in rhs: |
| | 164 | self.__args = self.__args + (rhs[key],) |
| 156 | 165 | if self._delegate_bytes and not six.PY3: |
| 157 | 166 | return bytes(self) % rhs |
| 158 | 167 | elif self._delegate_text: |