Lazy String#

class quart_babel.speaklater.LazyString(func: Callable, *args: Any, **kwargs: Any)#

The LazyString class provides the ability to declare translations without app context. The translations don’t happen until they are actually needed.

__init__(func: Callable, *args: Any, **kwargs: Any) None#

Constract a Lazy String.

Parameters:
  • func – The function to use for the string.

  • args – Arguments for the function.

  • kwargs – Kwargs for the function.

__repr__() str#

Return repr(self).

__str__() str#

Return str(self).

__lt__(other: str) bool#

Return self<value.

__le__(other: str) bool#

Return self<=value.

__eq__(other: Any) bool#

Return self==value.

__ne__(other: Any) bool#

Return self!=value.

__gt__(other: str) bool#

Return self>value.

__ge__(other: str) bool#

Return self>=value.

__hash__() int#

Return hash(self).

__weakref__#

list of weak references to the object (if defined)