Path: csiph.com!usenet.pasdenom.info!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed2.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.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'subject:Python': 0.05; 'null,': 0.07; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'int.': 0.16; 'mon,': 0.16; 'string': 0.17; 'wrote:': 0.17; 'instance': 0.17; 'integer': 0.17; '>>>': 0.18; 'appears': 0.18; 'feb': 0.19; 'code.': 0.20; 'earlier': 0.21; 'assignment': 0.22; 'init': 0.22; 'header:In-Reply-To:1': 0.25; 'skip:" 20': 0.26; 'am,': 0.27; 'instead.': 0.27; 'message- id:@mail.gmail.com': 0.27; 'unlikely': 0.29; 'point': 0.31; 'int': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'received:209.85': 0.35; 'there': 0.35; 'others.': 0.36; 'anything': 0.36; 'enough': 0.36; 'does': 0.37; 'received:209': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'comment': 0.38; 'mean': 0.38; 'things': 0.38; 'to:addr:python.org': 0.39; 'please,': 0.62; 'worth': 0.63; 'obvious': 0.71; '2013': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=sJyZurykqDij2rkpLTLUNcG6p7+Seawxwp/6mtFlQ0Q=; b=rg6PVdaNp2+DfKhvI8jJxAYmwtlEhIQHoYcpvJI921G57lWfwCVmmFgcM7zFN0uK/X Xit3oG38Tv+NPC0gVW/ysNaiNfBbGDPHNFfWstgPNyalx5piEzses3YU5hYLgwJCC2Xy 4coxA5S02RyYIvBpVWR3SySuMnIO9FtoY2OhGhhaK4hiXWP1V95G6fjIcdKlfI09zl5M xEcMr9IbSPdKLtIWzOBUB+lmony2BFYlSHAfrXZeS5xGokrGrbxvTdOaLtzHHEA6RlNP RmHA3P5bCurQ0U7FkMrW4dao6cPp65iY9tjjIUmOkZd03xASDSXZS4xoXDtziMjZXs4+ Ch8Q== MIME-Version: 1.0 X-Received: by 10.221.10.14 with SMTP id oy14mr8608792vcb.34.1361749546837; Sun, 24 Feb 2013 15:45:46 -0800 (PST) In-Reply-To: <2e9471ad-8320-4f7f-80ba-cd5a7f8f013d@googlegroups.com> References: <5127848B.1060004@gmail.com> <928d2cf7-728b-4f35-b8c9-4c9b958507e5@googlegroups.com> <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> Date: Mon, 25 Feb 2013 10:45:46 +1100 Subject: Re: Python Newbie From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1361749549 news.xs4all.nl 6919 [2001:888:2000:d::a6]:49681 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:39822 On Mon, Feb 25, 2013 at 10:38 AM, 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. > > Regarding my use of None to mean NULL, point taken to use "" instead. It's worth noting that None does make a good rendition of "null-as-opposed-to-blank", for instance when you're fetching data from an VARCHAR field in an SQL database. You'd use a string for anything that isn't NULL, and None for the others. ChrisA