Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #9189
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!xlned.com!feeder7.xlned.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'subject:Function': 0.09; 'wrote:': 0.15; 'rantingrick': 0.16; 'subject:variable': 0.16; 'pm,': 0.16; 'def': 0.16; 'header:In-Reply-To:1': 0.22; 'function': 0.26; 'print': 0.32; 'to:addr:python-list': 0.34; 'header:X-Complaints- To:1': 0.34; 'header:User-Agent:1': 0.34; 'questions?': 0.35; 'try:': 0.35; 'johnson': 0.35; 'skip:" 10': 0.36; 'received:org': 0.38; 'subject:: ': 0.38; 'header:Mime-Version:1': 0.39; 'to:addr:python.org': 0.39; 'subject:local': 0.84 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | "Colin J. Williams" <cjw@ncf.ca> |
| Subject | Re: Function docstring as a local variable |
| Date | Sun, 10 Jul 2011 18:28:15 -0400 |
| References | <mailman.842.1310319682.1164.python-list@python.org> <64b5198e-5cc7-4790-898e-7f1abb199230@y24g2000yqb.googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Gmane-NNTP-Posting-Host | 69-196-176-206.dsl.teksavvy.com |
| User-Agent | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 |
| In-Reply-To | <64b5198e-5cc7-4790-898e-7f1abb199230@y24g2000yqb.googlegroups.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.855.1310336914.1164.python-list@python.org> (permalink) |
| Lines | 19 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1310336914 news.xs4all.nl 21878 [2001:888:2000:d::a6]:35127 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:9189 |
Show key headers only | View raw
On 10-Jul-11 13:44 PM, rantingrick wrote:
> On Jul 10, 12:41 pm, Tim Johnson<t...@johnsons-web.com> wrote:
>> It possible for a function to print it's own docstring?
>
> def f():
> """docstring"""
> print "docstring"
>
> any questions?
Try:
def f():
ds= """docstring"""
print ds
>
Colin W.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Function docstring as a local variable Tim Johnson <tim@johnsons-web.com> - 2011-07-10 09:41 -0800
Re: Function docstring as a local variable rantingrick <rantingrick@gmail.com> - 2011-07-10 10:44 -0700
Re: Function docstring as a local variable "Colin J. Williams" <cjw@ncf.ca> - 2011-07-10 18:28 -0400
Re: Function docstring as a local variable Ben Finney <ben+python@benfinney.id.au> - 2011-07-11 09:48 +1000
Re: Function docstring as a local variable Corey Richardson <kb1pkl@aim.com> - 2011-07-10 19:00 -0400
Re: Function docstring as a local variable Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-07-11 11:54 +1000
Re: Function docstring as a local variable alex23 <wuwei23@gmail.com> - 2011-07-10 21:05 -0700
csiph-web