Python Newbie

MRAB python at mrabarnett.plus.com
Thu Feb 21 16:58:22 EST 2013


On 2013-02-21 21:26, Piterrr wrote:
> Hi folks. I am a long time C sharp dev, just learning Python now due
> to job requirements. My initial impression is that Python has got to
> be the most ambiguous and vague language I have seen to date. I have
> major issues with the fact that white space matters. How do you deal
> with this? For example, you open a source file in different editors
> and the indentation levels change even though i only have spaces, no
> tabs (compare Windows Notepad and Notepad++). Which editor do you
> trust? In addition, code is difficult to read because you cannot lay
> it out in easily discernable blocks. For example, I always tend to
> indent a full 'if' statement block so that it is easier to see where
> the if block starts and ends. Can't do that in Python. What is even
> more frustrating is that Python is inconsistent with its syntax. For
> example, when I write "if (myVariable != 0):" then this is OK but
> "for (i in intAry):" results in syntax error. Apparently Python has
> problems with my use of parentheses. How retarded. I think I will
> rather find another job than eat my nerves with Python. Any comments
> on this before I quit my job?
>
Python isn't C#. It has a different syntax.

Pascal isn't C# either.

Pascal would accept:

     if (myVariable <> 0) then
         ...

and reject:

     for (i := 0 to 9) do
         ...

As for the indentation, it shouldn't change if you're using only spaces
(not unless you're using a proportional font!).



More information about the Python-list mailing list