What is the docstring convention in Python for the following "magic" class methods:
__str__
__unicode__
__repr__
Should I add docstrings for these? If yes, what should they say (for each)?
Bob Dylan
asked Nov 23, 2015 at 20:27
-
1Sharing your research helps everyone. Tell us what you've tried and why it didn’t meet your needs. This demonstrates that you’ve taken the time to try to help yourself, it saves us from reiterating obvious answers, and most of all it helps you get a more specific and relevant answer. Also see How to Askgnat– gnat2015年11月24日 04:42:00 +00:00Commented Nov 24, 2015 at 4:42
1 Answer 1
I wouldn't add docstrings; they'll never meaningfully differ from the python stdlib docs relating to them.
answered Nov 23, 2015 at 20:45
lang-py