Oh, I forgot there's another way to add braces if it_is_way_cool: #{ print 'coolness' #}
On Wed, Aug 13, 2008 at 11:06 PM, xbmuncher <[EMAIL PROTECTED]> wrote: > I'll check out your links. But in response to some of the things said: > I'm a fan of indentation, a replacement of indentation with curly braces is > not what I was aiming for. If I could have it my way, I'd have indentation > and curly braces. I don't want to change official python syntax either.. I > just want to be able to easily do it myself. > > The big problem I had that I didn't explain well enough when I said > "visually" is that it is visually hard to tell when code blocks end when > other code blocks and statements begin immediately after them. With curly > braces you can easily visualize when looking at a lot of code where the code > block ends. The best thing you can do in python currently is to put an empty > line in between the last line of a code block and the following code, so you > can better visualize the end of the code block. > > On Wed, Aug 13, 2008 at 4:23 AM, Chris Fuller > <[EMAIL PROTECTED]> wrote: >> >> Some clarifications w.r.t. indentation and Python: >> http://www.secnetix.de/olli/Python/block_indentation.hawk >> >> It's just a joke, really: >> http://timhatch.com/projects/pybraces/ >> >> Turnabout is fair play! >> http://blog.micropledge.com/2007/09/nobraces/ >> >> Also, pindent.py in the Tools/scripts directory of your Python >> distribution >> will produce correctly indented scripts if the blocks are designated with >> a "#end" line. >> >> >> But seriously, you don't want to go creating a separate class of source >> file. >> It'll be harder for you and the other programmers to context switch when >> working with code that uses the standard style, will confuse others who >> won't >> know what to do with your code, adds overhead to the compiling, will break >> when somebody tries to run it under the standard environment, could >> clutter >> up your development directories, depending on the implementation, etc. >> >> Here's a thread from 1999 on the Python mailing list that discusses the >> issue: >> http://mail.python.org/pipermail/python-list/1999-June/004450.html >> >> There's another script towards the end that might even do what you want, >> but >> you might want to read what they have to say first :) >> >> Cheers >> _______________________________________________ >> Tutor maillist - Tutor@python.org >> http://mail.python.org/mailman/listinfo/tutor > > > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > > _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor