Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!news2.euro.net!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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'argument': 0.04; 'subject:Python': 0.05; 'say,': 0.05; 'function,': 0.07; 'variables.': 0.07; 'python': 0.09; 'ambiguity': 0.09; 'behavior,': 0.09; 'decision.': 0.09; 'declarations': 0.09; 'exist.': 0.09; 'libraries.': 0.09; 'notation': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr :python-list': 0.10; 'language,': 0.11; 'language': 0.14; 'java,': 0.15; '"def"': 0.16; '"elif"': 0.16; '(meaning': 0.16; 'bugs.': 0.16; 'conditional': 0.16; 'cryptic': 0.16; 'example)': 0.16; 'observations': 0.16; 'obsessed': 0.16; 'one)': 0.16; 'alternate': 0.17; 'variables': 0.17; 'appropriate': 0.20; 'mostly': 0.20; 'parameters': 0.20; 'cc:2**0': 0.23; 'work.': 0.23; "python's": 0.23; 'statement': 0.23; 'seems': 0.23; 'cc:no real name:2**0': 0.24; 'idea': 0.24; 'least': 0.25; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'creating': 0.26; 'values': 0.26; 'continuing': 0.27; '(as': 0.27; 'c++': 0.27; 'have,': 0.27; 'is?': 0.27; 'existence': 0.29; 'way?': 0.29; 'this.': 0.29; 'that.': 0.30; 'keyword': 0.30; 'basic': 0.30; 'function': 0.30; 'good.': 0.32; 'not.': 0.32; 'getting': 0.33; 'says': 0.33; 'impression': 0.33; 'anyone': 0.33; 'everyone': 0.33; 'languages': 0.33; 'received:google.com': 0.34; 'thanks': 0.34; 'whatever': 0.35; 'exist': 0.35; 'false': 0.35; 'otherwise.': 0.35; 'open': 0.35; 'continue': 0.35; 'received:209.85': 0.35; 'something': 0.35; 'there': 0.35; 'really': 0.36; 'but': 0.36; 'should': 0.36; 'too': 0.36; 'does': 0.37; 'why': 0.37; 'passed': 0.37; 'rather': 0.37; 'received:209': 0.37; 'far': 0.37; 'subject:: ': 0.38; 'fact': 0.38; 'mean': 0.38; 'some': 0.38; 'short': 0.39; 'help': 0.40; 'your': 0.60; 'from:no real name:2**0': 0.60; 'kind': 0.61; 'time,': 0.62; 'genuine': 0.62; 'between': 0.63; 'skip:n 10': 0.63; 'more': 0.63; 'here': 0.65; 'legal': 0.65; 'offer': 0.65; 'learned': 0.65; 'forward': 0.66; 'today': 0.67; 'benefit': 0.70; 'friendly': 0.71; 'reviewed': 0.74; 'interest.': 0.78; 'appreciating': 0.84; 'designed,': 0.84; 'toy': 0.84; 'dare': 0.93; 'serious': 0.98 X-Received: by 10.49.116.115 with SMTP id jv19mr304923qeb.21.1361569040984; Fri, 22 Feb 2013 13:37:20 -0800 (PST) Newsgroups: comp.lang.python Date: Fri, 22 Feb 2013 13:37:20 -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> 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-list@python.org 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: 58 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1361569049 news.xs4all.nl 6859 [2001:888:2000:d::a6]:46771 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:39616 Thanks to everyone for all the posts, some friendly some not. I read all of= them with genuine interest. So I am continuing to learn Python, here are my new observations for your c= onsideration. There seems to be a "heated" argument about Python's apparently intentional= ambiguity in conditional statements. Specifically, the issue is, is it mor= e appropriate to write (as an example) if (some statement): # short form rather than if (some statement =3D=3D true): # long form Some 50(?) years ago, C was designed so that everything other than 0 evalua= ted to true and was false otherwise. Fast forward to recent memory, when C#= was designed, Microsoft claims they reviewed all the features of C, C++ an= d Java, pulled the best features from each of these languages and designed = a new language that would help minimize the potential for planting bugs. Sa= y what you want about MS inventions, but my experience is that to require t= he long form notation was a good decision. For me the fact that the short n= otation is legal in Python is a stepback in language design. Python invento= rs, when creating what is after all considered a contemporary language, sho= uld have known better. Call me psychopath if you will (have seen this in on= e post), but I shall continue to use the aforementioned long form as I alwa= ys have, and no Python is going to change that. Today I learned the hard way that all function parameters in Python are pas= sed by reference (meaning whatever happens to them inside a function, new v= alues are always passed to caller). Not good. I got caught up on this. To c= ombat the mostly unwanted behavior, inside a function I have to reassign va= riables intended to be local to new variables. A pain. Can anyone offer ONE= reason why Python was designed that way? Out of curiosity, does anyone have any idea why function declarations are p= receded by the keyword "def" rather than something more intuitive like "fun= ction" or at least "func", perhaps? Does anyone know what the benefit of writing the cryptic "elif" to mean "el= se if" is? Curiously, the default statement in an if/else chain is preceded= by "else" and not "el". Someone said I am too narrow-sited appreciating C# and not open to alternat= e approaches to language design. Well if that someone says "def" is better = than "function" and "elif" is better than "else if", then dare I say, you a= re obsessed with Python! So far I am getting the impression that Python is a toy language of some ki= nd (similar to Basic of the early 80's), not really suitable for serious wo= rk. The only difference between these languages (admittedly, a serious one)= is the existence of extensive libraries. Otherwise there would be no good = reason for Python to exist. Nevertheless, it does exist and I have to learn= it. As long as someone is paying for my time, that's OK with me. Peter