On 22 December 2017 at 20:55, Brett Cannon <br...@python.org> wrote:

>
>
> On Fri, Dec 22, 2017, 11:38 Chris Barker, <chris.bar...@noaa.gov> wrote:
>
>> On Fri, Dec 22, 2017 at 8:49 AM, Brett Cannon <br...@python.org> wrote:
>>
>>> I  think it's worth reminding people that if they don't like the fact
>>>> dataclasses (ab)use type hints for their succinct syntax that you can
>>>> always use attrs instead to avoid type hints.
>>>>
>>>
>> sure -- but this doesn't really address the issue, the whole reason this
>> is even a discussion is because dataclasses is going into the standard
>> library. Third party packages can do whatever they want, of course.
>>
>> And the concern is that people (in particular newbies) will get confused
>> / the wrong impression / other-negative-response by the (semi) use of
>> typing in a standard library module.
>>
>
> I'm still not worried. Type hints are part of the syntax and so are no
> worse off than async/await and asyncio IMO.
>
>
>>
>>> As for those who feel dataclasses will force them to teach type hints
>>> and they simply don't want to, maybe we could help land protocols
>>>
>>
>> Could you please clarify what this is about ???
>>
>
> There's a PEP by Ivan (on my phone else I would look up the number).
>
>
If anyone is curious this is PEP 544. It is actually already fully
supported by mypy, so that one can play with it
(you will need to also install typing_extensions, where Protocol class
lives until the PEP is approved).

--
Ivan
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to