Whoops, meant to reply to Gregory on that one, sorry Richard.

On Thu, Jun 25, 2020 at 7:15 PM Gregory P. Smith <greg@krypto.org> wrote:

Can I use an i18n'd _("string") within a case without jumping through hoops to assign it to a name before the match:?

The PEP currently says:

"The named class must inherit from type. It may be a single name or a dotted name (e.g. some_mod.SomeClass or mod.pkg.Class). The leading name must not be _, so e.g. _(...) and _.C(...) are invalid. Use object(foo=_) to check whether the matched object has an attribute foo."