Jun-27-2018, 11:13 AM
I have a doc declared at the top of a script, like so:
#!/usr/bin/python3 import re """ A Twitter username can only contain alphanumeric characters (A-Z numbers 0-9). The exception being an underscore. Symbols, dashes or spaces are not valid. Examples: @zyx - valid @xyz_abc - valid, since it contains an underscore @abc!abc - invalid, since it contains a special character xyz@abc - invalid, since characters that prefix the @ are not allowed @999 - valid @abc 999 - invalid, since spaces cannot form part of the username """ def test_doc(): """ This is a test """ if __name__ == "__main__": print(__doc__) # print(main.__doc__) print(test_doc.__doc__)Output:
None This is a testHow do I print the main doc out?