On Wed, Aug 11, 2021 at 2:56 PM Thomas Grainger wrote:
> Would:
> ```
> @dataclass
> class Node:
> global_node: __class__ | None
> ```
>
> "Just work" with co_annotations?
>
This feels too specialized to me.
It would be great to also handle forward references to other classes and
cyclic
On Wed, Aug 11, 2021 at 10:32 AM Thomas Grainger wrote:
> Larry Hastings wrote:
> > On 8/11/21 12:02 AM, Thomas Grainger wrote:
> > > I think as long as there's a test case for something like
> > > @dataclass
> > > class Node:
> > > global_node: ClassVar[Node | None]
> > > left:
On Fri, Apr 16, 2021 at 5:28 PM Ćukasz Langa wrote:
> [snip] I say "compromise" because as Inada Naoki measured, there's still a
> non-zero performance cost of PEP 649 versus PEP 563:
>
> - code size: +63%
> - memory: +62%
> - import time: +60%
>
>
> Will this hurt some current users of typing?
On Fri, Apr 16, 2021 at 8:27 AM Inada Naoki wrote:
> After PEP 563, only `'List[int]'` is practical so we can stop
> supporting `List["int"]` and others at some point.
>
There's a lot of code written before PEP 563 was available (and code that
needs to support earlier Python versions) that
with a value of a specific
type.
Jukka Lehtosalo
[1] https://mail.python.org/mailman3/lists/typing-sig.python.org/
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman
On Thu, Nov 2, 2017 at 3:45 PM, Steven D'Aprano wrote:
> On Wed, Nov 01, 2017 at 03:48:00PM -0700, Lukasz Langa wrote:
>
> > This PEP proposes changing function annotations and variable annotations
> > so that they are no longer evaluated at function definition time.
> >
ml> by
>> Nick, my response
>> <https://mail.python.org/pipermail/python-ideas/2017-May/045557.html>).
>>
>> Credit for the proposal goes to Naomi Seyfer, with discussion by Ivan
>> Levkivskyi and Jukka Lehtosalo.
>>
>> If there's no further deb