Extract doc strings

Ben Finney ben+python at benfinney.id.au
Thu Jul 1 05:27:20 EDT 2010


moerchendiser2k3 <googler.1.webmaster at spamgourmet.com> writes:

> when I have a PyCodeObject, is there any way to extract a doc string
> from the code?

I'm not very familiar with using the C interface for Python, but does it
help to know that a docstring for an object is available at that
object's ‘__doc__’ attribute?

-- 
 \         “Time is the great legalizer, even in the field of morals.” |
  `\                                                 —Henry L. Mencken |
_o__)                                                                  |
Ben Finney



More information about the Python-list mailing list