If you're new to #python programming, welcome aboard! I've spotted a few techniques that newcomers miss out on and thus learn more slowly.
First, and most important: install and use ipython. You will learn APIs much faster with tab completion and the ability to write foo? to see documentation for foo.
The default python interpreter will slow you down.
Second, install a linter in your editor. I suggest pyflakes for newcomers. This will catch lots of silly errors and give you fast feedback on syntax.
Third, avoid writing 'except:' in your code. This will hide glaring bugs because it will catch exceptions like NameError.
Instead, let the code crash, see what exception is raised, and only handle that.
Finally, all Python data types have sensible equality methods on them, so don't be afraid to use ==.
I regularly see people assume that they can't write a_dict == other_dict, especially when coming from C++.
Try it — it works! :)
• • •
Missing some Tweet in this thread? You can try to
force a refresh