r/pythontips • • Jul 18 '21

Python3_Specific Python best practices book recommendation

Hi fellow redditers,

I'm software developer coming for C++ background,
I'm looking for book(s) for python best practices that similar to the Cpp's Bible (effective C++) ..
Any recommendations?

Thanks,

36 Upvotes

9 comments sorted by

2

u/MH2019 Jul 18 '21

Doing the opposite (python -> c++), what's your recommendation OP?

1

u/[deleted] Jul 19 '21
  • Effective C++ series by Scott Meyers.

  • C++ best practices by Jason Turner (concise resource)

  • Have a look on cpp core guidelines.

  • On practice, use a static analyzer/linter to emphasise on best practices, there are plenty of free options, I prefer clang-tidy and cppcheck.

1

u/MH2019 Jul 19 '21

Thanks!!

12

u/halofreeman Jul 18 '21

I highly recommend "Automate the Boring Stuff with Python 2nd Edition"

9

u/lvvittor Jul 18 '21

Is not a book. But i recommend you to read the PEP8: https://www.python.org/dev/peps/pep-0008/

4

u/[deleted] Jul 18 '21

Beyond The Basics With Python, Serious Python, and Effective Python. Sorry I dont have author names. First one I believe is Al Sweigart. After you have some Python experience under your belt, then I would look at Fluent Python which I believe the 2nd edition is forthcoming or is out by now. There is also a site called Python Anti-Patterns too.

2

u/JohnGaltsGhost Jul 18 '21

Read pep-8. Then just type "idiomatic python" or "python styleguide" + "github" etc. "WTF python" will be also interesting.

2

u/Shindig_ Jul 18 '21

Also not a book, but Google's style guide for Python is great: https://google.github.io/styleguide/pyguide.html

2

u/chumaths Jul 19 '21

Not a book but realpython.com has really great articles that balance readability and depth really well