Re: [Python-Dev] PEP 572: Now with 25% less reference implementation!

2018-04-20 Thread Chris Angelico
On Sat, Apr 21, 2018 at 1:50 AM, Guido van Rossum wrote: > Maybe annotations should get a brief mention in the Rejected Ideas section, > with your explanation here added. (And maybe my response.) Good idea. Actually, since it's a syntactic difference, I've promoted it to the

Re: [Python-Dev] PEP 572: Now with 25% less reference implementation!

2018-04-20 Thread Guido van Rossum
Maybe annotations should get a brief mention in the Rejected Ideas section, with your explanation here added. (And maybe my response.) On Thu, Apr 19, 2018 at 11:31 PM, Chris Angelico wrote: > On Fri, Apr 20, 2018 at 2:45 PM, Dmitry Malinovsky > wrote: >

Re: [Python-Dev] PEP 572: Now with 25% less reference implementation!

2018-04-20 Thread Guido van Rossum
If you want type hints you can use a variable annotation without initialization before the statement: data: bytes while data := stream.read(): print("Got", data) On Thu, Apr 19, 2018 at 9:45 PM, Dmitry Malinovsky wrote: > Hello Chris, and thank you for working on this

Re: [Python-Dev] PEP 572: Now with 25% less reference implementation!

2018-04-20 Thread Chris Angelico
On Fri, Apr 20, 2018 at 2:45 PM, Dmitry Malinovsky wrote: > Hello Chris, and thank you for working on this PEP! > > What do you think about using variable type hints with this syntax? > I tried to search through python-dev and couldn't find a single post > discussing that

Re: [Python-Dev] PEP 572: Now with 25% less reference implementation!

2018-04-19 Thread Dmitry Malinovsky
Hello Chris, and thank you for working on this PEP! What do you think about using variable type hints with this syntax? I tried to search through python-dev and couldn't find a single post discussing that question. If I missed it somehow, could you please include its conclusions into the PEP?