Path: csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed1.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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'value,': 0.03; 'subject:Python': 0.05; 'none,': 0.05; 'parameter': 0.07; 'python': 0.09; 'ambiguity': 0.09; 'bool': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; 'language': 0.14; 'passing': 0.15; 'represents': 0.15; '(ubuntu': 0.16; 'boolean': 0.16; 'conditional': 0.16; 'googling': 0.16; 'said.': 0.16; 'sequential': 0.16; 'statement)': 0.16; 'typing': 0.17; 'creates': 0.18; 'code,': 0.18; 'versions': 0.20; 'holds': 0.20; 'mostly': 0.20; 'cc:2**0': 0.23; 'example': 0.23; 'seems': 0.23; 'long,': 0.24; 'least': 0.25; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'wrote': 0.26; 'values': 0.26; 'older': 0.27; 'functions.': 0.27; 'see,': 0.27; 'lines': 0.28; 'trouble': 0.28; 'statements': 0.29; 'point': 0.31; 'null': 0.33; 'languages': 0.33; 'that,': 0.34; 'received:google.com': 0.34; 'thanks': 0.34; 'server': 0.35; 'adds': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'really': 0.36; 'but': 0.36; 'should': 0.36; 'problems': 0.36; 'does': 0.37; 'received:209': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'files': 0.38; 'fact': 0.38; 'some': 0.38; 'short': 0.39; 'where': 0.40; 'think': 0.40; 'from:no real name:2**0': 0.60; 'back': 0.62; 'different': 0.63; 'helping': 0.63; 'more': 0.63; 'today,': 0.64; 'else.': 0.65; 'useful.': 0.65; 'obvious': 0.71; 'ian,': 0.84; 'inherent': 0.84; 'messed': 0.84; 'omission': 0.84; 'oscar': 0.84; 'mean.': 0.91; 'story.': 0.93 X-Received: by 10.49.58.238 with SMTP id u14mr329243qeq.13.1361576333304; Fri, 22 Feb 2013 15:38:53 -0800 (PST) Newsgroups: comp.lang.python Date: Fri, 22 Feb 2013 15:38:53 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=77.98.108.31; posting-account=KNmrtAoAAAD-o0n7P5clulJjssENqvZt References: <5127848B.1060004@gmail.com> <928d2cf7-728b-4f35-b8c9-4c9b958507e5@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 77.98.108.31 MIME-Version: 1.0 Subject: Re: Python Newbie From: piterrr.dolinski@gmail.com To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Python 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: , Message-ID: Lines: 37 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1361576864 news.xs4all.nl 6887 [2001:888:2000:d::a6]:44308 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:39628 Hi Ian, Thanks for typing all this for me. Really useful. I did some googling of my= own and I found that there was no concept of boolean in older versions of = Python like you said. (BTW, how does this omission go well with proper lang= uage design, as Oscar seems to have hinted?) I think this obvious shortcomm= ing is the main reason that, for example, when x holds the value of 5, x is= considered to be "true". You see, I have to maintain Python files (ubuntu = server scripts) which are 2000 lines long, all sequential code, no function= s. While the person who wrote them should be shot :), the fact that there i= s inherent ambiguity with value, none, null 0, you name it, in conditional = statements is not helping me understand the code, and this adds to my frust= ration. I messed up my if (some statement): # short form in the example I gave, but you figured exactly what I mean. Of course if th= e condition (some statement) is boolean there is no point adding "=3D=3D tr= ue" or similar. But if (some statement) represents a value this is where I = have trouble and again the origins of this date back to when Python had no = boolean type. So now at least I understand it. Btw, there are still languages with no boolean type today, MySQL for one. T= his creates big efficiency problems when fetching data from the database in= to a C# program - what should be a bool is fetched as an 8-byte integer! Bu= t that's a different story. I shut up now. As I said I am new to Python, learning it, I have to get more experience wi= th passing parameter values to functions, as I do with mostly everything el= se. Cheers. Peter