[Python-ideas] Optional static typing -- the crossroads
Greg Ewing
greg.ewing at canterbury.ac.nz
Mon Aug 18 08:06:47 CEST 2014
Chris Angelico wrote:
> With variable declarations,
> there's a difference between "int r,g,b; double x,y,z;", where the
> block of integers is terminated by a semicolon ...
> in argument lists, you don't get that,
Python's argument annotation syntax *could* have been
defined to work the Pascal way, with semicolons
separating the groups. But it wasn't, and it's too
late to change now.
> (Imagine you misspell a type
> name. It's no longer a keyword. How will your mistake be reported?)
I don't understand that. Type names are always clearly
separated from keywords in either style (they come after
a colon), so there's no danger of confusing them.
--
Greg
More information about the Python-ideas
mailing list