If - Or statements

Roy Smith roy at panix.com
Sun Jun 5 13:52:09 EDT 2005


venkata subramanian <venkatasubramanian at gmail.com> wrote:
>  It just reminds me that the most important thing about learning a
> language is also to learn its style and "paradigm" and not just its
> syntax and semantics. Or one might end up wrenching in
> "C-like-thinking" into a python program where it might not look
> necessarily pretty.

Exactly!

One sure sign of somebody trying to write C in Python is when they loop 
over a list by doing

for i in range (len (myList)):
   doSomethingWith (myList[i])

or when they laboriously check for every possible error condition before 
performing an operation instead of just doing it and catching the exception.



More information about the Python-list mailing list