On Thu, Jun 25, 2020 at 8:31 PM Richard Damon <rich...@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."
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/EAMFUFSEPZFABBMD3EWASUS5YQOA26YQ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to