Bracketing for a moment what keyword might be used, a thing I like about this syntax is that it can work for multiple names naturally.  E.g.

    expose Symbol as x, y, z

Or with a different word:

    define Typevar as T, S, R

For things like namedtuple that need more arguments, you'd need to use functools.partial to create the single argument callable to match the syntax.

On May 31, 2016 8:44 AM, "Steven D'Aprano" <steve@pearwood.info> wrote:
On Tue, May 31, 2016 at 08:27:28AM -0700, David Mertz wrote:
> This is bikeshedding a bit, but a keyword that looks good to me:
>
> expose Typevar as T
> expose Symbol as X

"expose" sounds like it is taking something hidden or private and
exposing it to the public. It doesn't give any hint that it takes the
name T and uses it as an argument to Typevar. I would take it as
meaning:

take the (possibly internal or private) thing Typevar, and bind it to
the name T

with no hint that Typevar was being called.


--
Steve
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/