* pyt...@bdurham.com <pyt...@bdurham.com> [110710 14:17]:
> I'm not sure how a function can get a generic handle to itself, but if
> you're willing to hardcode the function name, then this technique works:
> 
> def test():
>     """This is my doc string"""
>     print test.__doc__
> 
> test()
  Works for me. Works for the application I'm after. thanks
  Here's a related question:
  I can get the docstring for an imported module:
  >>> import tmpl as foo
  >>> print(foo.__doc__)
  Python templating features

   Author - tim at akwebsoft dot com

 ## Is it possible to get the module docstring
 ## from the module itself?

 Thanks again
-- 
Tim 
tim at johnsons-web dot com or akwebsoft dot com
http://www.akwebsoft.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to