3 ms·
Look at Google's Python Style Guide: http://google-styleguide.googlecode.com/svn/trunk/pyguide.html http://google-styleguide.googlecode.com/svn/trunk/pyguide.ht
by jzwinck 12y ago
Look at Google's Python Style Guide: http://google-styleguide.googlecode.com/svn/trunk/pyguide.html http://google-styleguide.googlecode.com/svn/trunk/pyguide.ht...
There is almost nothing in there that sounds like a landmine. Rather, some general guidance about "don't use global variables," "x may not be thread safe," and "don't write overly complex lambdas."
My favorite "gotcha" in Python is using e.g. a list as a default argument. That's in the guide, and it sucks, but Python has surprisingly few such problems for newcomers.
- YZF 12y agoI can think of two landmines that make most C++ issues pale. First is things blowing up at run-time due to typos or syntax errors. Second (related) is that you can't safely refactor because you don't really know the types that functions take or where they're being called from. Sure C++ can be a pain but you can build and maintain very large software in C++. It's a lot harder to do in Python (without taking other considerations into account).