Just recently I have been getting very a bizarre issue, which I have found no resolve to. For example, if I run the following code in the interpreter
>>> def test():
... 'docstring'
... ...
...
>>> print(test.__doc__)
I get 'docstring,' no surprise there. Now if I run this in a *.py file, I get None.
I have tried multiple files with the same results; but why does the interpreter return the docstring and not any files? Any help would most certainly be appreciated.
Note: I have tried triple quotes, double and single, and any other variation I can muster, with no luck.
Solved: Not sure how exactly, but the command I was using was 'broken' in that shell instance. Working fine now