As the question states, I want to know if it's possible to view the code (doc string) to view it's content and know how it is written/formatted. It doesn't have to necessarily be via the python shell, but it would be good if it was.
More specifically, how would I view a class code from a library? I've recently been messing around with a game-making library called pygame
, I have came across this question when I was messing around with some modules, and did a "print (pygame.x.__doc__)
" and much to my amusement it actually returned me with a code snippet. Hence the spark in curiosity.