Type hinting/docstring of class instance attributes?
Hi,
I'd presume this question has been asked before, but I can't find anything about it. So here goes...
I'm looking for a way to type hint/docstring class instance attributes.
This will give me help when creating objects. , like:
But accessing the instance attribute name of the object does not give any help. Any clues?
I'd presume this question has been asked before, but I can't find anything about it. So here goes...
I'm looking for a way to type hint/docstring class instance attributes.
class Person: def __init__(self, name): """ @param name: Name of the person. @type name: str """ self.name = name
This will give me help when creating objects. , like:
p = Person("John")
But accessing the instance attribute name of the object does not give any help. Any clues?
Please sign in to leave a comment.