Skip to content

LazyString.__rmod__ is unused? #234

@andreymal

Description

@andreymal

It is broken. If you call it directly, you get an incorrect result because of a typo:

>>> lazy_string = lazy_gettext(u'test')
>>> lazy_string.__rmod__('Hello %s!')
'Hello %s!test'

But the test in test_lazy_old_style_formatting is actually passing! I guess this is because Python calls str.__mod__('Hello %s!', lazy_string) instead.

This means that LazyString.__rmod__ is probably never used. Maybe just remove it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions