<div dir="ltr">try typing this on your python shell : <b><i>from __future__ import braces</i></b><br>check the output:<i><b> SyntaxError: <span style="background-color: rgb(255, 0, 0);">not a chance</span> (<pyshell#0>, line 1)</b></i><br>
<br><div class="gmail_quote">On Wed, Aug 13, 2008 at 10:15 AM, xbmuncher <span dir="ltr"><<a href="mailto:xboxmuncher@gmail.com">xboxmuncher@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr">Yes I think python is great in its simplicity in typing code but not in its absence of curly brackets to surround code blocks. Personally, it helps me visually see the code blocks as well as saves me constant pain when the compiler complains about broken/missing indents in the code.<b> I think it would be great if there was an editor for python or a plugin for an existing program to be able to use curly brackets { } when defining code blocks, and then maybe with a push of a button it can convert the curly bracket style code that ignores indents to the indent sensitive code that the python compiler wants. </b>It would save me a lot of headache in the way too many times I'm constantly trying to hunt down indentation problems in code (usually other people's code). I tried getting different editors with "auto-identing" as it is listed in the recommend python editors in the python website. However, these don't suffice in fixing most indenation problems... They sometimes even make it worse!<br>
<br>Even visually a lot of people write their lines like this:<br>def funcName(arg):<br> bla bla bla<br> more content of function<br>if (this == that)<br> do this<br><br>Simple indentation errors can be a nightmare in determining whether if statements and other code blocks are inside of another code block or not.... when all that seperates them is a single bad indent, which could be the error you're looking for, or what it that way in the begg! <br>
<br><br><b>So if you know of a plugin for a python editor, let me know. :)</b><br>Also, another idea is to edit the compiler somehow or create soem kind of process/script that all scripts with teh curly brackets will get removed before being processed... I'd settle for this solution as well if it exists...<br>
<br>I"m sure I'm not the only one that has contemplated a curly bracket workaround for python before. :)<br></div>
<br>_______________________________________________<br>
Tutor maillist - <a href="mailto:Tutor@python.org">Tutor@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">http://mail.python.org/mailman/listinfo/tutor</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Cheers,<br>Vishwajeet<br><a href="http://www.singhvishwajeet.com">http://www.singhvishwajeet.com</a><br>
</div>