Path: csiph.com!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.068 X-Spam-Evidence: '*H*': 0.86; '*S*': 0.00; 'python': 0.10; '"new': 0.16; '2.7.3': 0.16; 'classes"': 0.16; 'subject:class': 0.16; 'subject:variable': 0.16; 'header:In-Reply-To:1': 0.24; 'skip:# 10': 0.27; 'developing': 0.28; 'probably': 0.31; 'related': 0.32; 'class': 0.33; 'question,': 0.35; 'but': 0.36; 'instead': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'version': 0.38; 'to:addr:python.org': 0.40; 'called': 0.40; 'charset:windows-1252': 0.62; 'strictly': 0.64; 'developed': 0.66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shopzeus.com; s=shopzeus_com; t=1445319062; bh=4QMh2y79SwE3AOVHFWnx4aeUugaOhpNQKCwoUsDbQOw=; h=Subject:To:References:From:Date:In-Reply-To:From; b=FBBzEjoeR0axt2xaf/DvEjKz52B8oNHoSm0wJmHS8ms/wk2301kiUhyo4GTQT7JOl NvBKk7mSVTWhxOv9j7c1Aa6f3NqkJnPThUV00EM/8evGCm5uqzgJA5SG8UofPBUdQ6 WYAeK7Bt/0mq4yNWEt55jNo9iMiWWbDTU7ue38hmhZkF05KAzlOKVBVfC7LLpLO/VU T7UUUzdG8CUq6Sfq9NXfGZ1PjUcrBr4MkTBFaxsm2gxiadqRVcoaAsug67A8nQbOL1 uCnZGEEhZ1ZR7YHVErVl3mz7+HpDbtNydO5TZDAiLaCfGn1KAI+1ob0aY1aM85Hiwi 897mQi7hlv2ew== Subject: Re: variable scope of class objects To: python-list@python.org References: From: =?UTF-8?Q?Nagy_L=c3=a1szl=c3=b3_Zsolt?= Date: Tue, 20 Oct 2015 07:31:02 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1445319071 news.xs4all.nl 23773 [2001:888:2000:d::a6]:50159 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:97825 > > #!/usr/bin/python > # -- developed using Python 2.7.3 > > class BME280: Not strictly related to the question, but you probably want to use so called "new style classes" when developing a new program for Python version 2. In other words, use: class BME280(object): instead of class BME280: