<div dir="ltr"><div class="gmail_default" style="font-size:small">On Tue, Dec 19, 2017 at 10:53 AM, Paul Moore <span dir="ltr"><<a href="mailto:p.f.moore@gmail.com" target="_blank">p.f.moore@gmail.com</a>></span> wrote:<br></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On 19 December 2017 at 07:49, Eric V. Smith <<a href="mailto:eric@trueblade.com">eric@trueblade.com</a>> wrote:<br>
> Data Classes is also not the first use of type annotations in the stdlib:<br>
> <a href="https://docs.python.org/3/library/typing.html#typing.NamedTuple" rel="noreferrer" target="_blank">https://docs.python.org/3/<wbr>library/typing.html#typing.<wbr>NamedTuple</a><br>
><br>
<br>
</span>Also, the fact that no-one raised this issue during the whole time the<br>
PEP was being discussed (at least as far as I recollect) and that<br>
Guido (who of all of us should be most aware of what is and isn't<br>
acceptable use of annotations in the stdlib) approved the PEP,<br>
suggests to me that this isn't that big a deal.<br>
<br>
The only thing that has surprised me in this discussion is that the<br>
actual type used in the annotation makes no difference. And once<br>
someone reminded me that types are never enforced at runtime (you can<br>
call f(x: int) with f('haha')) that seemed fine.<br></blockquote><div><br></div><div class="gmail_default" style="font-size:small">​If anything, this makes things more difficult for the learner.​ The fact that annotations are formally undefined as to anything but syntax is sensible but can be misleading (as the example above clearly shows).</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">In the typing module it's logical to see annotations, I guess. But I really hope they aren't sprinkled around willy-nilly. Sooner or later there will be significant demand for annotated libraries, even though CPython will perform exactly as it does with non-annotated code. I can see the value of annotations in other environments and for different purposes, but it would be a pity if this were to unnecessarily complicate the stdlib.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">regards</div><div class="gmail_default" style="font-size:small"> Steve </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div></div></div></div>