conchylicultor <etiennefg....@gmail.com> added the comment:
> Do you have an actual use case for self-referential annotations? I'm not sure I understand the question. My use case is the following: ``` from ... import losses class A: losses: losses.Losses = losses.Losses() ``` Currently this is failing be cause this get resolved as: ``` class A: name: <module losses>.Losses().Losses = <module losses>.Losses() ``` Instead of what I want/expected: ``` class A: name: <module losses>.Losses = <module losses>.Losses() ``` I would expect that both "losses.Losses" on the left and right of the `=` refer to the outer module (`name: <module losses>.Losses`), while currently it is resolved as `name: name.Losses` ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43746> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com