Py introspection - comments and __doc__

See http://docs.python.org/library/inspect.html

def test_function():
""" Explanation of this function """
print "Testing: %s .." % test_function.__doc__

test_create_job__single_format()
>> Testing: Explanation of this function ..

Comments

Popular posts from this blog

Handling control characters (escaping) in python for json and mysql

python port sniffer with pcapy and impacket

Django field, form and model validation process