Perl has the strict
and warnings
pragmas and a couple of CPAN modules for encouraging good style and reducing errors. Is there a Python counterpart that can help me avoid such problems and bad practices while it encourages me to use a more Pythonic structure?
I should make it clear that I do not know what I want to avoid. There is probably a lot of traps to fall into, and I'm not looking for a substitute to reading good code, reading about common errors and writing a lot, but for a complementing automated resource.
I believe pylint (http://www.logilab.org/857) is the most most common tool used for this purpose.
The classic style guide for Python is PEP8. If you are interested in style errors, a checker for PEP8 can be found at http://pypi.python.org/pypi/pep8.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With