Author parsampsh
Recipients parsampsh
Date 2020-11-29.12:58:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1606654735.38.0.791756891374.issue42503@roundup.psfhosted.org>
In-reply-to
Content
python raises error `Undefined class X` when you declaring parameter type or return type of method as the self of class:

class MyClass:
    def mymethod(self, a: MyClass): # parameter type is class self
        pass

# or

class MyClass:
    def mymethod(self) -> MyClass: # return type is class self
        pass
# or both of them

error `Undefined class ...` will be raised.
History
Date User Action Args
2020-11-29 12:58:55parsampshsetrecipients: + parsampsh
2020-11-29 12:58:55parsampshsetmessageid: <1606654735.38.0.791756891374.issue42503@roundup.psfhosted.org>
2020-11-29 12:58:55parsampshlinkissue42503 messages
2020-11-29 12:58:55parsampshcreate