Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python.': 0.02; 'python,': 0.02; 'subject:Python': 0.06; 'subject:code': 0.07; 'cc:addr :python-list': 0.11; 'python': 0.11; 'braces,': 0.16; 'curly': 0.16; 'parser.': 0.16; 'sizable': 0.16; 'subject: \n ': 0.16; 'subject:between': 0.16; 'language': 0.16; 'pointed': 0.19; 'seems': 0.21; 'cc:addr:python.org': 0.22; 'this?': 0.23; 'looks': 0.24; 'cc:2**0': 0.24; 'task': 0.26; 'header:In-Reply-To:1': 0.27; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'subject:that': 0.31; 'probably': 0.32; 'languages': 0.32; 'something': 0.35; 'convert': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'so,': 0.37; 'even': 0.60; 'back': 0.62; 'making': 0.63; 'such': 0.63; 'choose': 0.64; 'to:addr:gmail.com': 0.65; 'pardon': 0.84; 'from.': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=KRHkFhkGbbRhUH0UDSiICkDgG8JYKOglQA760CNu3QM=; b=s2A9BnLxN+BA0A/uJyWtJ/g4bDk2Imh+QWIMVGi4mT3ShPGswdJTr7UAiIJCUCwjkB SBJ4aYKkAXumkGfr+vQJqJIPcZhbjEE6lATx990JWNkkAUvpQSRek3RS73K8i+SANVsc 6Wpwlrq+Et8AD0e5yCMhwoIy+bLICITIk9OMbeqsfXZp2m216dcj9+sZjjfL/5s34lCM dvCMwK9lBjNNnHSoKeptYO3IqwzTZyEYklCAvMyxKc/+hdnvy4Ro2K527Ye807TQ5FRw F90KfXjTSUq71Eyonh5ayZ8rtnXNORBtoO7TRTuI3g1A5Hl5QcO3qm36mpOASAJXBjlo Yjuw== MIME-Version: 1.0 X-Received: by 10.220.124.1 with SMTP id s1mr11551425vcr.93.1375280353034; Wed, 31 Jul 2013 07:19:13 -0700 (PDT) In-Reply-To: References: <09DBD544-FA04-48DC-8FEA-1E788FE1C6A6@gmail.com> Date: Wed, 31 Jul 2013 10:19:12 -0400 Subject: Re: Script that converts between indentation and curly braces in Python code From: Joel Goldstick To: Chris Angelico Content-Type: text/plain; charset=UTF-8 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: , Newsgroups: comp.lang.python Message-ID: Lines: 10 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1375280362 news.xs4all.nl 15917 [2001:888:2000:d::a6]:54341 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:51660 So, why do you want to do this? As has been pointed out, its a difficult and likely sizable task to build such a parser. In the end you get something that isn't a computer language -- even tho it looks like one. And it also is probably just as big a job to convert it back to python. So, what is the point? Pardon me for making assumptions, but this seems to be a variation on the theme of 'I don't like python, it doesn't have curly braces'. So if you need curly braces, you have many other languages to choose from. Python isn't one of them.