Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #27587
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <miki.tebeka@gmail.com> |
| 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; 'attribute': 0.05; 'literal': 0.09; 'subject:Why': 0.09; 'subject:string': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; 'subject:not': 0.11; 'docstring': 0.16; 'empty.': 0.16; 'from:addr:miki.tebeka': 0.16; 'from:name:miki tebeka': 0.16; 'modules,': 0.16; 'subject:doc': 0.16; 'suite.': 0.16; 'string': 0.17; 'wrote:': 0.17; 'string,': 0.17; 'thanks,': 0.18; '>>>': 0.18; 'statement': 0.23; 'cc:addr:python.org': 0.25; 'header:In- Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'thanks!': 0.26; 'cc:addr:gmail.com': 0.27; 'wonder': 0.27; 'cc:2**2': 0.27; 'received:209.85.212': 0.28; '>>>>': 0.29; 'source': 0.29; 'class': 0.29; 'classes': 0.30; 'received:google.com': 0.34; 'pm,': 0.35; 'subject:?': 0.35; 'received:209.85': 0.35; 'cc:no real name:2**1': 0.36; 'itself': 0.37; 'why': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'object': 0.38; 'some': 0.38; 'first': 0.61; 'received:209.85.212.56': 0.91 |
| Newsgroups | comp.lang.python |
| Date | Tue, 21 Aug 2012 10:40:04 -0700 (PDT) |
| In-Reply-To | <mailman.3613.1345570273.4697.python-list@python.org> |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=75.82.8.111; posting-account=uo-8fwoAAACKsFzFX78JHudx1V7WDXZ0 |
| References | <3a128081-7f5d-4641-bc5d-8cffe64f5eee@googlegroups.com> <mailman.3613.1345570273.4697.python-list@python.org> |
| User-Agent | G2/1.0 |
| X-Google-Web-Client | true |
| X-Google-IP | 75.82.8.111 |
| MIME-Version | 1.0 |
| Subject | Re: Why does dynamic doc string do not work? |
| From | Miki Tebeka <miki.tebeka@gmail.com> |
| To | comp.lang.python@googlegroups.com |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Cc | python-list@python.org, d@davea.name, Miki Tebeka <miki.tebeka@gmail.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> |
| Message-ID | <mailman.3614.1345570807.4697.python-list@python.org> (permalink) |
| Lines | 42 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1345570807 news.xs4all.nl 6895 [2001:888:2000:d::a6]:40201 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:27587 |
Show key headers only | View raw
Thanks!
> On 08/21/2012 12:44 PM, Miki Tebeka wrote:
>
> > <snip>
>
> >>> class B:
>
> > ... '''a {} string'''.format('doc')
>
> > ...
>
> >>>> B.__doc__
>
> >>>>
>
> > <snip> I wonder why the first B docstring is empty. Thanks, -- Miki
>
>
>
> According to some early documentation:
>
>
>
> "convenient initialization of the |__doc__| attribute of modules,
>
> classes and functions by placing a string literal by itself as the first
>
> statement in the suite. It must be a literal -- an expression yielding a
>
> string object is not accepted as a documentation string, since future
>
> tools may need to derive documentation from source by parsing."
>
>
>
> --
>
>
>
> DaveA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Why does dynamic doc string do not work? Miki Tebeka <miki.tebeka@gmail.com> - 2012-08-21 09:44 -0700
Re: Why does dynamic doc string do not work? Ian Kelly <ian.g.kelly@gmail.com> - 2012-08-21 11:09 -0600
Re: Why does dynamic doc string do not work? MRAB <python@mrabarnett.plus.com> - 2012-08-21 18:16 +0100
Re: Why does dynamic doc string do not work? Ian Kelly <ian.g.kelly@gmail.com> - 2012-08-21 11:21 -0600
Re: Why does dynamic doc string do not work? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-21 17:22 +0000
Re: Why does dynamic doc string do not work? Dave Angel <d@davea.name> - 2012-08-21 13:30 -0400
Re: Why does dynamic doc string do not work? Miki Tebeka <miki.tebeka@gmail.com> - 2012-08-21 10:40 -0700
Re: Why does dynamic doc string do not work? Miki Tebeka <miki.tebeka@gmail.com> - 2012-08-21 10:40 -0700
csiph-web