Python Newbie
piterrr.dolinski at gmail.com
piterrr.dolinski at gmail.com
Sun Feb 24 14:29:44 EST 2013
> To demonstrate that the person who wrote this code was not a good Python
>
> programmer. I hope it wasn't you :-) This person obviously had a very
>
> basic, and confused, understanding of Python.
>
>
>
> And, quite frankly, was probably not a very good programmer of *any*
>
> language:
>
>
>
> - poor use of Hungarian notation for variable names;
>
> - pointless pre-declaration of values;
>
> - redundant comments that don't explain anything.
>
>
>
> If that code came from the code-base you are maintaining, no wonder you
>
> don't think much of Python! That looks like something I would expect to
>
> see at the DailyWTF.
Hi. Steve, I don't know where you have been over the past couple of days but it is widely known (if the thread title is any indication) that I am indeed very new to Python, but not new to programming in general.
To give a bit of background where I found __str__, I am using a Python IDE called PyScripter. Its Intellisense is full of methods starting and ending with "__", hence the question.
Regarding Hungarian notation, I don't use it in any other language but Python and JS. Call it poor, but it helps me to remember what type a variable is. The redundant comments serve the same purpose. As for "pointless predeclaration", it helps me know where in the code I first started using the variable, so I know there are no references to it before then.
Peter
More information about the Python-list
mailing list