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


Groups > comp.lang.python > #76739

Re: Distinguishing attribute name from varible name to make codes clear and definite

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Denis McMahon <denismfmcmahon@gmail.com>
Newsgroups comp.lang.python
Subject Re: Distinguishing attribute name from varible name to make codes clear and definite
Date Thu, 21 Aug 2014 14:23:38 +0000 (UTC)
Organization A noiseless patient Spider
Lines 11
Message-ID <lt4vda$ll5$1@dont-email.me> (permalink)
References <mailman.13252.1408630431.18130.python-list@python.org>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
Injection-Date Thu, 21 Aug 2014 14:23:38 +0000 (UTC)
Injection-Info mx05.eternal-september.org; posting-host="66ffcfa4470a58bcddbdcd1913f98ab4"; logging-data="22181"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19BfXjqYQDul5Av81e6oiJSbmKPFRoIhOg="
User-Agent Pan/0.136 (I'm far too busy being delicious; GIT 926a150 git://git.gnome.org/pan2)
Cancel-Lock sha1:tHfzsRpJ/5W49ZcqfdIiOpZgCA8=
Xref csiph.com comp.lang.python:76739

Show key headers only | View raw


On Thu, 21 Aug 2014 22:13:32 +0800, luofeiyu wrote:

> I feel that self.x and x will be confused in the following codes.

Then don't call them self.x and x, call them self.internal_x and param_x, 
or any other pair of different names.

You are the one who chooses what names to use in your code.

-- 
Denis McMahon, denismfmcmahon@gmail.com

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


Thread

Distinguishing attribute name from varible name to make codes clear and definite luofeiyu <elearn2014@gmail.com> - 2014-08-21 22:13 +0800
  Re: Distinguishing attribute name from varible name to make codes clear and definite Denis McMahon <denismfmcmahon@gmail.com> - 2014-08-21 14:23 +0000

csiph-web