I use CursorAI’s IDE.
I usually make attributes understandable by turning them into a property, which allows me to add a docstring, which will display on hover.
Example:
def __init__(self): self._vague_attribute = anything() @property def vague_attribute(self) -> any: """ This is what I do... """ return self._vague_attribute
Slightly inconvenient and increases visual load.
Is there an alternative?
submitted by /u/Maleficent_Height_49
[link] [comments]
r/learnpython I use CursorAI’s IDE. I usually make attributes understandable by turning them into a property, which allows me to add a docstring, which will display on hover. Example: def __init__(self): self._vague_attribute = anything() @property def vague_attribute(self) -> any: “”” This is what I do… “”” return self._vague_attribute Slightly inconvenient and increases visual load. Is there an alternative? submitted by /u/Maleficent_Height_49 [link] [comments]
I use CursorAI’s IDE.
I usually make attributes understandable by turning them into a property, which allows me to add a docstring, which will display on hover.
Example:
def __init__(self): self._vague_attribute = anything() @property def vague_attribute(self) -> any: """ This is what I do... """ return self._vague_attribute
Slightly inconvenient and increases visual load.
Is there an alternative?
submitted by /u/Maleficent_Height_49
[link] [comments]