Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #9178

Re: Function docstring as a local variable

Date 2011-07-10 12:34 -0800
From Tim Johnson <tim@johnsons-web.com>
Subject Re: Function docstring as a local variable
References <20110710174121.GB12935@johnsons-web.com> <4E19E5A5.5020905@gmail.com>
Organization AkWebsoft
Newsgroups comp.lang.python
Message-ID <mailman.846.1310330073.1164.python-list@python.org> (permalink)

Show all headers | View raw


* Andrew Berg <bahamutzero8825@gmail.com> [110710 09:59]:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: RIPEMD160
> 
> On 2011.07.10 12:41 PM, Tim Johnson wrote:
> > It possible for a function to print it's own docstring?
> >>> def test():
> ...     """Hi there."""
> ...     print(test.__doc__)
  Holy Moly. Of course!
  thanks
-- 
Tim 
tim at johnsons-web dot com or akwebsoft dot com
http://www.akwebsoft.com

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Function docstring as a local variable Tim Johnson <tim@johnsons-web.com> - 2011-07-10 12:34 -0800

csiph-web