Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.028 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'logic': 0.09; 'added.': 0.16; 'attribute,': 0.16; 'pythonic': 0.16; 'subject:Classes': 0.16; 'unlikely': 0.16; 'wrote:': 0.18; 'things.': 0.19; '31,': 0.24; 'replace': 0.24; 'java': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'topic': 0.29; "doesn't": 0.30; 'message- id:@mail.gmail.com': 0.30; 'fri,': 0.33; 'but': 0.35; 'received:google.com': 0.35; 'doing': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'sound': 0.68; 'practicing': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=+Vz6joKy5Knd30ZkI5NDJuy0cTmoDXWm2CUUJAvHzIY=; b=0w1US5sGwqU7KSAn5UaJuLbH8x768Yfo3pcG/xwaR5CBuEnWQIoYZInuKA9+A+2jCe UcKaa2IYG3IQXZ1r5ChM68cM+D5lFUKFD8G3vKXA91Zq5EIGSftfSZYADaD/7hWzbza3 eBoWcbv7DNMnhfow4y42BcrBtqtbkJcEioJPsG6IvpLioPXf7TT8PqrVu4zxCJcrpJAb /jEcZznfp/ACbk0VE+J0NX5eMTSpiNAIXXNVw0VNR3QQYLJLGIM5AmGADuly3WnSnjHs W0fCM3A6oiaXsBtsbVndco/qVwnC6F6d9ajWwUgq7ZubwXa5DJYAgOg9FjNK223EkrBK 17tg== X-Received: by 10.66.252.193 with SMTP id zu1mr3020159pac.153.1414766884316; Fri, 31 Oct 2014 07:48:04 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <51755at03r0bidjqh3qf0hhpvjr8756ill@4ax.com> <545350c3$0$23449$426a74cc@news.free.fr> From: Ian Kelly Date: Fri, 31 Oct 2014 08:47:23 -0600 Subject: Re: Classes To: Python Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 9 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1414766892 news.xs4all.nl 2936 [2001:888:2000:d::a6]:58578 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:80020 On Fri, Oct 31, 2014 at 8:05 AM, Seymore4Head wrote: > Because the topic of that lesson was getter setter. > I can construct an __init___ but I was practicing get/set. Doesn't sound like a very good lesson to me. Getters and setters are the Java way of doing things. The Pythonic way is to just use an attribute, and then replace it with a property in the unlikely event that getter/setter logic needs to be added.