Skip to content

Overload operators on Localizable to provide easy access to common operations #4445

Description

@bartfeenstra

Two of the most common operations on Localizables is to join them into a paragraph or multiple paragraphs. Can we implement __mul__() and __add__() to join two localizables as a single paragraph and as multiple paragraphs respectively? * is evaluated before +, which means we can just chain both of these operators linearly to create paragraphs of individual localizables.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DXDeveloper Experience: issues that make things easier or friendlier for developersenhancementNew feature or requestpythonPull requests that update Python code

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions