Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #76690

Re: what is the difference between name and _name?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <elearn2014@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.058
X-Spam-Evidence '*H*': 0.88; '*S*': 0.00; 'expressions': 0.07; 'def': 0.12; 'name):': 0.16; 'subject:between': 0.16; 'to:addr:pearwood.info': 0.16; 'to:addr:steve+comp.lang.python': 0.16; "to:name:steven d'aprano": 0.16; 'header:User-Agent:1': 0.23; 'header:In-Reply-To:1': 0.27; 'to:2**1': 0.27; 'doc': 0.31; 'subject:what': 0.31; 'class': 0.32; 'skip:_ 10': 0.34; 'subject:the': 0.34; 'info': 0.35; 'received:google.com': 0.35; 'subject:?': 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; 'name': 0.63; 'more': 0.64; 'charset:windows-1252': 0.65; '?how': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=ykcDcWtGnGCRZwPsAAVvlsk7tlud5gFxj+nL/b18EUU=; b=WGQkShjItnRMeIX39pLyN70haQilJG8Q69ZwyireZKwdjacpCAK+7/1PTFYdb7/Mke XalL5AGbN5TpM+XCwt+y2U0rP4U0uScKf1Y1YI4bVSL+aQ7ejCVF/OdT84AM2X2hZ/e+ sJ2DTSBD6k1PooJPoPEUjW7K34ExNzKz12nsgfQEVpLFIHbSMwUMBKX2NJhUKJ4SJxHc t9H9n0TWOP2uLPxU7LcWcISjtGpq6eyonPWB4vnzpd6enqeDOiTP9pCZXh4ZlK84jmW/ 1TfA7lJzsrvOTGkmIP46WufOXYeX2+kUIxrj8fhkHPyERQW9UTdgyIf1tVOx22zzXIX3 BajA==
X-Received by 10.68.250.3 with SMTP id yy3mr57995037pbc.56.1408587623573; Wed, 20 Aug 2014 19:20:23 -0700 (PDT)
Date Thu, 21 Aug 2014 10:20:00 +0800
From luofeiyu <elearn2014@gmail.com>
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0
MIME-Version 1.0
To Steven D'Aprano <steve+comp.lang.python@pearwood.info>, python-list@python.org
Subject Re: what is the difference between name and _name?
References <mailman.13190.1408519045.18130.python-list@python.org> <53f46100$0$29884$c3e8da3$5496439d@news.astraweb.com> <mailman.13201.1408534898.18130.python-list@python.org> <53f4be1f$0$29978$c3e8da3$5496439d@news.astraweb.com>
In-Reply-To <53f4be1f$0$29978$c3e8da3$5496439d@news.astraweb.com>
Content-Type text/plain; charset=windows-1252; 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 <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.13226.1408587631.18130.python-list@python.org> (permalink)
Lines 24
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1408587631 news.xs4all.nl 2955 [2001:888:2000:d::a6]:58330
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:76690

Show key headers only | View raw


one more question,how can i get the doc info?

class Person(object):
     def __init__(self, name):
         self._name = name
     def getName(self):
         print('fetch....')
         return self._name
     def setName(self, value):
         print('change...')
         self._name = value
     def delName(self):
         print('remove....')
         del self._name
     name = property(getName, setName, delName, "name property docs")

Person("bob").name.doc
Person("bob").name.__doc__
Person("bob")._name.doc
Person("bob")._name.__doc__

all the expressions can not get the info "name property docs" ?how can i 
get it?

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

what is the difference between name and _name? luofeiyu <elearn2014@gmail.com> - 2014-08-20 15:16 +0800
  Re: what is the difference between name and _name? Steven D'Aprano <steve@pearwood.info> - 2014-08-20 08:49 +0000
    Re: what is the difference between name and _name? luofeiyu <elearn2014@gmail.com> - 2014-08-20 19:41 +0800
      Re: what is the difference between name and _name? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-21 01:26 +1000
        Re: what is the difference between name and _name? luofeiyu <elearn2014@gmail.com> - 2014-08-21 10:20 +0800
        Re: what is the difference between name and _name? Chris Angelico <rosuav@gmail.com> - 2014-08-21 13:10 +1000
        Re: what is the difference between name and _name? luofeiyu <elearn2014@gmail.com> - 2014-08-22 14:37 +0800
    Re: what is the difference between name and _name? "Frank Millman" <frank@chagford.com> - 2014-08-20 14:18 +0200

csiph-web