Thank you for the clarification! I should have looked through the PEPs
first.
On Thu, Jan 25, 2018 at 10:14 PM, Guido van Rossum wrote:
> PEP 526 has this in the "Rejected/Postponed Proposals" section:
>
> - **Allow annotations in** ``with`` **and** ``for`` **statement:**
> This was rejected b
PEP 526 has this in the "Rejected/Postponed Proposals" section:
- **Allow annotations in** ``with`` **and** ``for`` **statement:**
This was rejected because in ``for`` it would make it hard to spot the
actual
iterable, and in ``with`` it would confuse the CPython's LL(1) parser.
On Thu, Jan
2018-01-25 15:00 GMT-08:00 Joe Jevnik via Python-Dev
:
> Currently there are many ways to introduce variables in Python; however,
> only a few allow annotations. I was working on a toy language and chose to
> base my syntax on Python's when I noticed that I could not annotate a loop
> iteration v
Currently there are many ways to introduce variables in Python; however,
only a few allow annotations. I was working on a toy language and chose to
base my syntax on Python's when I noticed that I could not annotate a loop
iteration variable. For example:
for x: int in range(5):
...
This led