OT: Website CMS
Lennart Sorensen
lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Tue Aug 25 14:10:03 UTC 2009
On Mon, Aug 24, 2009 at 09:45:02PM -0400, William O'Higgins Witteman wrote:
> On Mon, Aug 24, 2009 at 08:45:18PM -0400, Rajinder Yadav wrote:
>
> >About Python, being a C++ developer I like using my braces { } to
> >denote code blocks, or any other visual indicator like 'end'
> >
> >I maybe be wrong about this, but read that python (only) uses
> >indentation to denote code blocks? I just don't want to be looking at
> >code that may have several nested blocks trying to line up code
> >blocks. That is what is stopping me from liking Python, that were I
> >stopped looking at Python. If I am wrong about this let me know.
>
> I think you will find that you are wrong, and it will not be a problem.
> My experience is that I was already using an auto-indenting editor (vim,
> but all good editors do this, and most of the bad ones too) and I just
> stopped noticing that I wasn't using braces.
>
> I have had other people claim to be skeptical, but once they got going
> it was the same as it always was - they didn't change their indentation,
> they just didn't use a character to augment the indentation they were
> already doing.
I didn't really look at python for years because I thought mandetory
indentation wasn't the language's business.
Now having used it I realize that in python the code works the way it
appears to work, rather than the way braces make it work. This helps
to avoid mistakes. Python simply requires the code to be consistent
which as a programmer you should want too.
--
Len Sorensen
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list