[Python-Dev] Re: PEP 647 Accepted

2021-04-11 Thread Barry Warsaw
On Apr 7, 2021, at 12:59, Guido van Rossum wrote: > > Note that in TypeScript this also doesn't look like a boolean -- it uses a > unique syntax that has to be learned: > > function isCustomer(partner: any): partner is Customer { > . . . > } > > Arguably the TS syntax is more easily intuit

[Python-Dev] Re: PEP 647 Accepted

2021-04-08 Thread Federico Salerno
I vaguely remember reading some discussion about Annotated and, for what little it's worth, I disagree with the consensus. For now all that comes to mind is either stuffing the information in docstrings (which would be kind of an involution, seeing as that was the way for annotating type befor

[Python-Dev] Re: PEP 647 Accepted

2021-04-07 Thread Guido van Rossum
On Wed, Apr 7, 2021 at 12:21 AM Federico Salerno wrote: > I don't have any decent proposal at the moment but I think coming up with > a way to annotate side-effects of functions (including typeguard-ness) > could come in handy. If we anticipate needing that, perhaps it would be > beneficial to co

[Python-Dev] Re: PEP 647 Accepted

2021-04-07 Thread Federico Salerno
I don't have any decent proposal at the moment but I think coming up with a way to annotate side-effects of functions (including typeguard-ness) could come in handy. If we anticipate needing that, perhaps it would be beneficial to come up with that feature before implementing this PEP, lest we