<div dir="ltr">On 4 September 2016 at 19:29, Nick Coghlan <span dir="ltr"><<a href="mailto:ncoghlan@gmail.com" target="_blank">ncoghlan@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
So in this case, attempting to entirely defer specification of the<br>
semantics creates a significant risk of type checkers written on the<br>
assumption of C++ or Java style type declarations actively inhibiting<br>
the dynamism of Python code, suggesting that the PEP would be well<br>
advised to declare not only that the PEP 484 semantics are unchanged,<br>
but also that a typechecker that flags the example above as unsafe is<br>
wrong to do so.<br></blockquote></div><br></div><div class="gmail_extra">I don't think that a dedicated syntax will increase the<br></div><div class="gmail_extra">risk more than the existing type comment syntax. Moreover,<br></div><div class="gmail_extra">mainstream type checkers (mypy, pytype, etc) are far<br></div><div class="gmail_extra">from C++ or Java, and as far as I know they are not going<br></div><div class="gmail_extra">to change semantics.<br><br></div><div class="gmail_extra">As I understand, the main point of Mark is that such syntax suggests<br></div><div class="gmail_extra">visually a variable annotation, more than a value annotation.<br></div><div class="gmail_extra">However, I think that the current behavior of type checkers will<br></div><div class="gmail_extra">have more influence on perception of people rather than a visual<br></div><div class="gmail_extra">appearance of annotation.<br><br></div><div class="gmail_extra">Anyway, I think it is worth adding an explicit statement to the PEP<br></div><div class="gmail_extra">that both interpretations are possible (maybe even add that value<br></div><div class="gmail_extra">semantics is inherent to Python). But I don't think that we should<br></div><div class="gmail_extra">*prohibit* something in the PEP.<br></div><div class="gmail_extra"><br></div>--<br><div class="gmail_extra">Ivan<br></div><div class="gmail_extra"><br></div></div>