[issue11339] annotation for class being defined

2022-03-25 Thread Irit Katriel
Change by Irit Katriel : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue11339] annotation for class being defined

2022-03-25 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Agree. typing.Self from PEP 673 fixes this specific case, and PEP 563 or 649 will provide a general solution. No need to keep this issue open. -- nosy: +JelleZijlstra status: pending -> open ___ Python tracker

[issue11339] annotation for class being defined

2022-03-24 Thread Irit Katriel
Irit Katriel added the comment: This looks like PEP 673 – Self Type. -- nosy: +iritkatriel resolution: -> out of date status: open -> pending ___ Python tracker ___ __

[issue11339] annotation for class being defined

2021-03-15 Thread Kamil Turek
Change by Kamil Turek : -- nosy: +kamilturek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue11339] annotation for class being defined

2021-03-15 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Is this issue resolved with PEP 563 and the behavior becoming default in Python 3.10? https://www.python.org/dev/peps/pep-0563/#forward-references -- nosy: +xtreak ___ Python tracker

[issue11339] annotation for class being defined

2021-03-15 Thread Socob
Change by Socob <206a8...@opayq.com>: -- nosy: +Socob ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue11339] annotation for class being defined

2017-02-13 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue11339] annotation for class being defined

2017-01-12 Thread Ryan Hiebert
Changes by Ryan Hiebert : -- nosy: +ryanhiebert ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue11339] annotation for class being defined

2011-07-09 Thread Eric Snow
Changes by Eric Snow : -- nosy: +ericsnow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue11339] annotation for class being defined

2011-07-09 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue11339] annotation for class being defined

2011-03-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: >The basic problem is that the class object is defined after the class >definitions have been made, I have sometimes thought the the class statement could start with binding the name to a blank object or new, blank class object. But then people might try to

[issue11339] annotation for class being defined

2011-02-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: Until and unless this gets fixed, perhaps we should document some sort of workaround. One possibility is attached. -- Added file: http://bugs.python.org/file20941/annotations_workaround.py ___ Python tracker

[issue11339] annotation for class being defined

2011-02-27 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue11339] annotation for class being defined

2011-02-27 Thread Armin Rigo
Changes by Armin Rigo : -- nosy: -arigo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue11339] annotation for class being defined

2011-02-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: This would be an important fix-up if we could find some way to implement it. The basic problem is that the class object is defined after the class definitions have been made, so the target of the Graph reference isn't known when the method definitions are

[issue11339] annotation for class being defined

2011-02-27 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- Removed message: http://bugs.python.org/msg129659 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue11339] annotation for class being defined

2011-02-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: class Prepared(type): 'Preload the class with a reference to itself' @classmethod def __prepare__(mcl, name, bases): return {name: type(name, bases, {})} def __new__(mcl, name, bases, mapping): tmpcls = super().__new__(mcl, n

[issue11339] annotation for class being defined

2011-02-27 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- Removed message: http://bugs.python.org/msg129657 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue11339] annotation for class being defined

2011-02-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: This would be an important fix-up if we could find some way to implement it. The basic problem is that the class object is defined after the class definitions have been made, so the target of the Graph reference isn't known when the method definitions are

[issue11339] annotation for class being defined

2011-02-27 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- Removed message: http://bugs.python.org/msg129656 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue11339] annotation for class being defined

2011-02-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: This would be an important fix-up if we could find some way to implement it. The basic problem is that the class object is defined after the class definitions have been made, so the target of the Graph reference isn't known when the method definitions are

[issue11339] annotation for class being defined

2011-02-26 Thread Benjamin Peterson
Benjamin Peterson added the comment: This has been true forever. I suggest you try python-ideas. -- nosy: +benjamin.peterson resolution: -> rejected status: open -> closed ___ Python tracker _

[issue11339] annotation for class being defined

2011-02-26 Thread Andy Harrington
New submission from Andy Harrington : You cannot make a self-referential annotation like class Graph: def reverse(self) -> Graph: # ... This corresponds to a common coding situation. -- components: Interpreter Core messages: 129587 nosy: andyharrington priority: normal sever