Please accept PEP 649!

Python's type hinting has become so much more useful than originally thought, 
and without this change much of that will be hindered. For example (you already 
know about Pydantic and FastAPI) 
[discord.py](https://github.com/Rapptz/discord.py)'s commands system allows you 
to use typehinting to specify how arguments should be converted. Take the 
following code:

```py
import discord
from discord.ext import commands

bot = commands.Bot(command_prefix='>')

@bot.command()
# discord.py reads the typehints and converts the arguments accordingly
async def reply(ctx, member: discord.Member, *, text: str):  # ctx is always 
passed
    await ctx.send(f'{member.mention}! {text}')

bot.run('token')
```

I must say, this is extremely ergonomic design! Don't break it :)
_______________________________________________
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/S2O7SE4QZQARAYSCOT7PQUEPNENHDJTQ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to