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


Groups > comp.lang.python > #9178 > unrolled thread

Re: Function docstring as a local variable

Started byTim Johnson <tim@johnsons-web.com>
First post2011-07-10 12:34 -0800
Last post2011-07-10 12:34 -0800
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#9178 — Re: Function docstring as a local variable

FromTim Johnson <tim@johnsons-web.com>
Date2011-07-10 12:34 -0800
SubjectRe: Function docstring as a local variable
Message-ID<mailman.846.1310330073.1164.python-list@python.org>
* 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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web