mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
Fixed #32208 -- Allowed adding lazy() objects.
Co-authored-by: Claude Paroz <claude@2xlibre.net>
This commit is contained in:
committed by
Mariusz Felisiak
parent
fe886eee36
commit
577f2338f1
@@ -176,6 +176,12 @@ def lazy(func, *resultclasses):
|
||||
return str(self) % rhs
|
||||
return self.__cast() % rhs
|
||||
|
||||
def __add__(self, other):
|
||||
return self.__cast() + other
|
||||
|
||||
def __radd__(self, other):
|
||||
return other + self.__cast()
|
||||
|
||||
def __deepcopy__(self, memo):
|
||||
# Instances of this class are effectively immutable. It's just a
|
||||
# collection of functions. So we don't need to do anything
|
||||
|
||||
Reference in New Issue
Block a user