Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!ecngs!feeder2.ecngs.de!feeds.phibee-telecom.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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python.': 0.02; 'python,': 0.02; 'else:': 0.03; 'received:134': 0.05; 'subject:Python': 0.06; 'converts': 0.09; 'python': 0.11; 'def': 0.12; 'question.': 0.14; 'beating': 0.16; 'code?': 0.16; 'delimit': 0.16; 'delimiter': 0.16; 'endif': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; "i've": 0.25; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'see,': 0.30; 'strongly': 0.30; 'code': 0.31; 'comments': 0.31; 'probably': 0.32; 'checked': 0.32; 'languages': 0.32; 'thanks!': 0.32; 'subject: (': 0.35; 'but': 0.35; 'there': 0.35; 'really': 0.36; 'subject:New': 0.37; 'so,': 0.37; 'to:addr:python-list': 0.38; "couldn't": 0.39; 'to:addr:python.org': 0.39; 'space': 0.40; 'new': 0.61; 'total': 0.65; 'believe': 0.68; 'beat': 0.68; 'belt,': 0.84; 'horse': 0.84; 'dozen': 0.91; 'notion': 0.91; 'wanting': 0.93 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqcEABivL1WGuA9G/2dsb2JhbABch0/HaIJcAoIRAQEBAQEBhR8BAQQjVRELGAICBRYLAgIJAwIBAgFFEwgCiCaxMZB4hHQBAQgCIIEhigqFAxaCUoFFAQSbL4cMjW8ig3GDMAEBAQ Date: Thu, 16 Apr 2015 14:48:32 +0200 From: Antoon Pardon User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.5.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: New to Python - block grouping (spaces) References: <9fc57fc9-0399-4ff3-882a-d041f02827d8@googlegroups.com> In-Reply-To: <9fc57fc9-0399-4ff3-882a-d041f02827d8@googlegroups.com> Content-Type: text/plain; charset=utf-8 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: 37 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1429188517 news.xs4all.nl 2915 [2001:888:2000:d::a6]:49857 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:89019 On 04/16/2015 06:07 AM, Blake McBride wrote: > Greetings, > > I am new to Python. I am sorry for beating what is probably a dead horse but I checked the net and couldn't find the answer to my question. > > I like a lot of what I've seen in Python, however, after 35 years and probably a dozen languages under my belt, I very strongly disagree with the notion of using white space to delimit blocks. Not wanting to beat what I believe is probably a dead horse, I have one question. > > Is there a utility that will allow me to write Python-like code that includes some block delimiter that I can see, that converts the code into runnable Python code? If so, where can I find it? > > Thanks! > > Blake McBride If you really want this, and don't like using comments to achieve this, you can do the folling. endfor = endif = enddef = endwhile = None def poweri(a, i): if i < 0: i = -i fac = 1.0 / a else: fac = a endif total = 1 while i: if i % 2: total *= fac endif fac *= fac i /= 2 endwhile return total enddef