[issue44192] Annotations, Inheritance and Circular Reference

2021-05-24 Thread Filipe Laíns
Filipe Laíns added the comment: s/holder/older/ Sorry, my dyslexia is acting up. -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue44192] Annotations, Inheritance and Circular Reference

2021-05-24 Thread Filipe Laíns
Filipe Laíns added the comment: The annotations will effectively become strings, instead of object references, in Python 3.11, which solves this issue. You can enable this behavior in holder Python version with `from __future__ import annotations`, see PEP 563[1]. >>> class Base: ... _su

[issue44192] Annotations, Inheritance and Circular Reference

2021-05-20 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: -pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue44192] Annotations, Inheritance and Circular Reference

2021-05-20 Thread ReOb
New submission from ReOb : Basically, I have: ``` class Base: _sub: list[Sub] class Sub: _parent: Base ``` What creates a circular reference. It could be solved doing: ``` class Sub: pass class Base: _sub: list[Sub] class Sub: _parent: Base ``` But in the annotation,