Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #43008
| Path | csiph.com!usenet.pasdenom.info!news.franciliens.net!news.muarf.org!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <ngnedin@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.019 |
| X-Spam-Evidence | '*H*': 0.96; '*S*': 0.00; 'string': 0.09; 'subject:members': 0.09; 'subject:string': 0.09; 'advice,': 0.16; 'folks,': 0.16; 'nick': 0.16; 'sentinel': 0.16; 'supplied': 0.16; 'header:User-Agent:1': 0.23; 'question': 0.24; 'extension': 0.26; 'received:10.0.0': 0.31; 'doc': 0.31; 'struct': 0.31; 'url:python': 0.33; 'received:google.com': 0.35; 'thanks': 0.36; 'received:10.0': 0.36; 'url:org': 0.36; 'received:10': 0.37; 'message-id:@gmail.com': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'skip:p 20': 0.39; 'how': 0.40; 'url:3': 0.61 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=SHai1/O3aZFG9d2oZho9Sxlu0Dr+kjmKtoNcQVPAhfA=; b=vUiFGRKLI8JwCRiII2YmCWMVNcIhnR5JlM9Abp3Z57t4AMFcxbpFJFyT54MEmAVU9+ 62i0tDpzfm7rpERDQKFhUohOEIJOQ/xW8bl0Vwdtsamr+ATRa7uq8KqiUtxoI1DwIcJI y4xXeB77M+KY84b4+qZhETBL2nqT2dS3lk1qIpqpmRhM4CGJLX9hx/v5M/49p6P+nHEq lGv/1AxYWLOXLHpvvICWPZLjb4NCmIO9vmh7mWvOS5Ugt1mxsnAW3TqHopITucX2n6oe AduEbjPMIcQodYwyhVThy5k4/H/0U82hYsosP6zk3tU2lE9pna3F/OSq1UOaUlukOeuL STMQ== |
| X-Received | by 10.43.78.77 with SMTP id zl13mr107901icb.55.1365357731975; Sun, 07 Apr 2013 11:02:11 -0700 (PDT) |
| Date | Sun, 07 Apr 2013 13:02:09 -0500 |
| From | Nick Gnedin <ngnedin@gmail.com> |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | __doc__ string for getset members |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| 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.246.1365357741.3114.python-list@python.org> (permalink) |
| Lines | 32 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1365357741 news.xs4all.nl 6898 [2001:888:2000:d::a6]:53771 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:43008 |
Show key headers only | View raw
Folks,
I am writing an extension where I follow the guide on the web
(http://docs.python.org/3.3/extending/newtypes.html#generic-attribute-management).
I have an object declared,
struct Object
{
PyObject_HEAD
};
and a member set through tp_getset mechanism,
PyGetSetDef ObjectGetSet[] =
{
{"mem", (getter)MemGet, (setter)MemSet, "mem-doc-string", NULL},
{NULL} /* Sentinel */
};
My question is - how do I access the doc string "mem-doc-string"
supplied in the PyGetSetDef structure? If I type
print(obj.mem.__doc__)
then the __doc__ string for the result of a call to MemGet(...) is
printed, not the doc string supplied in the PyGetSetDef structure.
Many thanks for the advice,
Nick Gnedin
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
__doc__ string for getset members Nick Gnedin <ngnedin@gmail.com> - 2013-04-07 13:02 -0500
csiph-web