Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!selfless.tophat.at!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'question:': 0.09; 'subject:Function': 0.09; 'wrote:': 0.15; '"""this': 0.16; '-tkc': 0.16; 'docstring': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'gonna': 0.16; 'kick': 0.16; 'message-id:@tim.thechases.com': 0.16; 'received:70.251': 0.16; 'received:dsl.rcsntx.swbell.net': 0.16; 'received:rcsntx.swbell.net': 0.16; 'received:swbell.net': 0.16; 'subject:variable': 0.16; 'test()': 0.16; 'test():': 0.16; 'cc:addr:python-list': 0.16; 'pm,': 0.16; 'def': 0.16; 'cc:2**0': 0.21; 'cc:no real name:2**0': 0.22; 'header:In-Reply-To:1': 0.22; "i'm": 0.27; 'cc:addr:python.org': 0.30; 'module': 0.30; 'thanks': 0.31; 'print': 0.32; 'header:User-Agent:1': 0.34; 'doc': 0.35; 'johnson': 0.35; 'subject:: ': 0.38; 'yourself': 0.68; 'subject:local': 0.84 Date: Sun, 10 Jul 2011 18:14:53 -0500 From: Tim Chase User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 MIME-Version: 1.0 To: Tim Johnson Subject: Re: Function docstring as a local variable References: <20110710174121.GB12935@johnsons-web.com> <4E19E5A5.5020905@gmail.com> <1310336009.20776.2150240761@webmail.messagingengine.com> <20110710225018.GD12935@johnsons-web.com> In-Reply-To: <20110710225018.GD12935@johnsons-web.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - boston.accountservergroup.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tim.thechases.com X-Source: X-Source-Args: X-Source-Dir: Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1310339713 news.xs4all.nl 21795 [2001:888:2000:d::a6]:56657 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:9199 On 07/10/2011 05:50 PM, Tim Johnson wrote: > * python@bdurham.com [110710 14:17]: >> 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: > ## Is it possible to get the module docstring > ## from the module itself? You're gonna kick yourself :) print __doc__ -tkc