Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #9172
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <tim@johnsons-web.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.018 |
| X-Spam-Evidence | '*H*': 0.96; '*S*': 0.00; 'received:64.4': 0.09; 'subject:Function': 0.09; '"""this': 0.16; 'above?': 0.16; 'docstring': 0.16; 'subject:variable': 0.16; 'test():': 0.16; 'def': 0.16; 'code': 0.24; 'function': 0.26; 'thanks': 0.31; 'print': 0.32; 'to:addr:python-list': 0.34; 'header:User-Agent:1': 0.34; 'charset:us-ascii': 0.36; 'could': 0.37; 'to:addr:python.org': 0.39; 'subject:local': 0.84 |
| Date | Sun, 10 Jul 2011 09:41:21 -0800 |
| From | Tim Johnson <tim@johnsons-web.com> |
| To | Python ML <python-list@python.org> |
| Subject | Function docstring as a local variable |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| Organization | AkWebsoft |
| User-Agent | Mutt/1.5.20 (2009-06-14) |
| 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.842.1310319682.1164.python-list@python.org> (permalink) |
| Lines | 14 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1310319682 news.xs4all.nl 21746 [2001:888:2000:d::a6]:50993 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:9172 |
Show key headers only | View raw
Consider the following:
## code
def test():
"""This is my docstring"""
print(??) ## can I print the docstring above?
## /code
It possible for a function to print it's own docstring?
thanks
(pointers to docs could be sufficient)
--
Tim
tim at johnsons-web dot com or akwebsoft dot com
http://www.akwebsoft.com
Back to comp.lang.python | Previous | Next — 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