On Thu, Jun 25, 2020 at 8:31 PM Richard Damon <Richard@damon-family.org> wrote:

I thought _ was also commonly used as:

first, -, last = (1, 2, 3)

as a generic don't care about assignment. I guess since the above will
create a local, so not overwrite a 'global' function _ for translations,
so the above usage works as long as that function (or whatever namespace
you are in) doesn't use _ for translations. As long as the bindings in
match also make the symbol a local (which seems reasonable) then you
would get a similar restriction.

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."