<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">On Aug 15, 2014, at 11:43 AM, Sunjay Varma <<a href="mailto:varma.sunjay@gmail.com">varma.sunjay@gmail.com</a>> wrote:<div><blockquote type="cite"><p dir="ltr">Hi all,<br>
Has the syntax for specifying type been fully decided on already? </p><p dir="ltr">Using brackets may confuse new Python programmers. (…) Other languages use angle brackets to specify types.</p></blockquote></div><div><br></div><div>I also agree that angle brackets would be nicer. Guido decided against it for pragmatic reasons:</div><div>1. angle brackets would create Python source code incompatible with any version lower than 3.5</div><div>2. angle brackets would complicate the lexer (normally you expect < and > to be spaced, in this case it wouldn’t)</div><div>3. angle brackets would require a new mechanism in Python to store this kind of expression within the type; this is still true for generics expressed with square brackets but at least you can use the existing nuts and bolts of Python classes</div><div><br></div><div>All in all, this is more trouble than it’s worth.</div><div><br></div><div><span style="font-family: 'Lucida Grande'; orphans: 2; widows: 2;">-- </span><br style="font-family: 'Lucida Grande'; orphans: 2; widows: 2;"><span style="font-family: 'Lucida Grande'; orphans: 2; widows: 2;">Best regards,</span><br style="font-family: 'Lucida Grande'; orphans: 2; widows: 2;"><span style="font-family: 'Lucida Grande'; orphans: 2; widows: 2;">Łukasz Langa</span><br style="font-family: 'Lucida Grande'; orphans: 2; widows: 2;"><br style="font-family: 'Lucida Grande'; orphans: 2; widows: 2;"><span style="font-family: 'Lucida Grande'; orphans: 2; widows: 2;">WWW: <a href="http://lukasz.langa.pl/">http://lukasz.langa.pl/</a></span><br style="font-family: 'Lucida Grande'; orphans: 2; widows: 2;"><span style="font-family: 'Lucida Grande'; orphans: 2; widows: 2;">Twitter: @llanga</span><br style="font-family: 'Lucida Grande'; orphans: 2; widows: 2;"><span style="font-family: 'Lucida Grande'; orphans: 2; widows: 2;">IRC: ambv on #python-dev</span></div></body></html>