- Avoid using camelCase in variable/method/function names. Yes, I know Python itself break some of those rules, but they're trying to do it right in Python3. In fact, it'll be better if you read the PEP8 document (http://www.python.org/dev/peps/pep-0008/)
Nevertheless I would like to welcome you to Python and I hope you have a great experience with the language :-)
Despite being a day-to-day python programmer (scientific computing with some django on the side), apparently I've been living under a rock. When did .format supersede normal printf-style string formatting, ie. "%f" % (3.14)? Is the latter now deprecated?
PEP 3101: Advanced String Formatting. [...] The plan is to eventually make this the only API for string formatting, and to start deprecating the % operator in Python 3.1.
As far as I know, interpolation is not actually deprecated yet though.
> As the new String Formatting syntax is more flexible and handles tuples and dictionaries naturally, it is recommended for new code. However, there are no current plans to deprecate printf-style formatting.
- List comprehensions: helps a lot.
- (str|unicode).format method (http://docs.python.org/library/string.html#format-examples) provides you a very simple templating language.
- Avoid using camelCase in variable/method/function names. Yes, I know Python itself break some of those rules, but they're trying to do it right in Python3. In fact, it'll be better if you read the PEP8 document (http://www.python.org/dev/peps/pep-0008/)
Nevertheless I would like to welcome you to Python and I hope you have a great experience with the language :-)