Re: [Python-ideas] Trial balloon: adding variable type declarations in support of PEP 484

(FWIW, I like the <var>: <type> notation more than any alternative proposed so far.)
Me too. :-)
Just wanted to note that the typo
lamda: int
Becomes syntactically correct. Maybe there are other similar problems.

On Thu, Aug 4, 2016 at 10:07 AM, אלעזר elazarg@gmail.com wrote:
Just wanted to note that the typo
lamda: int
Becomes syntactically correct. Maybe there are other similar problems.
But even
lambda: int
on a line by itself is pointless, so I don't think this is much of a problem.

On Fri, Aug 5, 2016 at 3:07 AM, אלעזר elazarg@gmail.com wrote:
Just wanted to note that the typo
lamda: int
Becomes syntactically correct. Maybe there are other similar problems.
True, but the correct version "lambda: int" wouldn't appear on a line on its own, creating an anonymous function and then abandoning it. It'll normally appear in a function call or similar, where you wouldn't be allowed to type-declare a new variable.
ChrisA
participants (3)
-
Chris Angelico
-
Guido van Rossum
-
אלעזר