Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!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.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'subject:Python': 0.05; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; 'received:184.172': 0.09; 'received:gator410.hostgator.com': 0.09; '~ethan~': 0.09; "wouldn't": 0.11; 'int.': 0.16; 'received:70.85.130': 0.16; 'wrote:': 0.17; 'integer': 0.17; '>>>': 0.18; 'appears': 0.18; 'code.': 0.20; 'earlier': 0.21; 'assignment': 0.22; 'init': 0.22; 'example': 0.23; 'header:In- Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; '3.0': 0.27; 'unlikely': 0.29; 'int': 0.33; 'to:addr:python-list': 0.33; 'pm,': 0.35; 'something': 0.35; 'there': 0.35; 'but': 0.36; 'enough': 0.36; 'does': 0.37; 'rather': 0.37; 'subject:: ': 0.38; 'comment': 0.38; 'some': 0.38; 'things': 0.38; 'instead': 0.39; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'telling': 0.61; 'please,': 0.62; 'email addr:gmail.com': 0.63; 'believe': 0.69; 'contrary': 0.71; 'obvious': 0.71; 'received:gateway15.websitewelcome.com': 0.84; 'to:name:python': 0.84; 'yourself?': 0.84 Date: Sun, 24 Feb 2013 15:53:02 -0800 From: Ethan Furman User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: Python Subject: Re: Python Newbie References: <8eadd52c-d533-4333-8c7f-7bf3a6d7b046@googlegroups.com> <9p1ii899tkalvfd1cl7sneoqa9t1cqh4oj@invalid.netcom.com> <5129482F.3080402@gmail.com> <512a5199$0$29998$c3e8da3$5496439d@news.astraweb.com> <5a3bf25b-a08b-4084-a940-e1fd05a1045d@googlegroups.com> <2e9471ad-8320-4f7f-80ba-cd5a7f8f013d@googlegroups.com> In-Reply-To: <2e9471ad-8320-4f7f-80ba-cd5a7f8f013d@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator410.hostgator.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stoneleaf.us X-BWhitelist: yes X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([173.12.184.235]) [173.12.184.235]:59630 X-Source-Auth: ethan+stoneleaf.us X-Email-Count: 1 X-Source-Cap: dG9idWs7dG9idWs7Z2F0b3I0MTAuaG9zdGdhdG9yLmNvbQ== 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: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1361749985 news.xs4all.nl 6972 [2001:888:2000:d::a6]:55422 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:39824 On 02/24/2013 03:38 PM, piterrr.dolinski@gmail.com wrote: > >>> intX = 32 # decl + init int var >> How is it not obvious that "intX" is an integer *without* the comment? > > Indeed the assignment is enough to deduce "intX" is an int. The comment is there to let me know it is unlikely intX appears earlier in the code. Please, let me do things my way until I find reasons to the contrary. Of course you can, but wouldn't you rather find reasons to the contrary by us telling you, instead of tripping over something yourself? For example (I believe it's already been mentioned) "declaring" intX with some integer value does *nothing* to maintain X as an integer: --> intX = 32 --> intX = intX / 3.0 --> intX 10.6666666666 -- ~Ethan~