Fair enough , I can't say I have contributed to Mypy nor worked on a
significantly large codebase.
On Sat, Mar 14, 2020 at 2:12 PM Guido van Rossum wrote:
> On Sat, Mar 14, 2020 at 1:03 PM Noah Peter May wrote:
>
>> Yeah, PEP 585 should definitely get pushed through! That would be super
>>
On Sat, Mar 14, 2020 at 1:03 PM Noah Peter May wrote:
> Yeah, PEP 585 should definitely get pushed through! That would be super
> useful all around.
>
> Besides that, I think PEP 563 would mitigate most of the slowdown at
> runtime introduced by 604. The only exceptions would be explicit like
>
Yeah, PEP 585 should definitely get pushed through! That would be super
useful all around.
Besides that, I think PEP 563 would mitigate most of the slowdown at
runtime introduced by 604. The only exceptions would be explicit like
assigning variables to types (int_list = List[int]) or dataclasses
On Sat, Mar 14, 2020 at 1:12 PM Inada Naoki wrote:
> I'm sorry, I meant (a) looks more consistent with PEP 560.
>
Sorry again, I meant PEP 585, not PEP 560 as Guido explained already.
--
Inada Naoki
___
Python-ideas mailing list --
On Sat, Mar 14, 2020 at 11:24 AM Inada Naoki wrote:
>
[snip]
> a) Add `|` to all types.
> b) Support it only statically (`from __future__ import annotations`).
>
[snip]
> But (b) seems more consistent with PEP 560.
>
I'm sorry, I meant (a) looks more consistent with PEP 560.
--
Inada Naoki
I think we should try to get PEP 604 accepted, with the runtime option (a),
since that's the way we've gone already.
PEP 604 proposes the right syntax, and I think mostly the right semantics
(one could quibble about whether isinstance()/issubclass() ought to accept
unions). Unfortunately it does
First of all, I am not so happy about typing is increasing
Python runtime complexity.
TypeScript is the most successful language with gradual typing.
It has almost zero-cost about typing. It doesn't make JavaScript
runtime complex. I hoped Python goes in same way.
But Python went the different
Support for "| None" would be great to have.
+1.
https://github.com/python/peps/blob/master/pep-0604.rst
On Fri, Mar 13, 2020, 9:36 AM Chris Angelico wrote:
> On Sat, Mar 14, 2020 at 12:24 AM Noah Peter May wrote:
> >
> > Hello everyone,
> >
> > I'm not certain if this has been brought up
On Sat, Mar 14, 2020 at 12:24 AM Noah Peter May wrote:
>
> Hello everyone,
>
> I'm not certain if this has been brought up before, but I felt like bringing
> it to the table anyway.
>
> As the title says, it would be convenient to represent a union type with the
> or operator.
>
Yep! You're