Hacker News new | ask | show | jobs
by no_wizard 3438 days ago
May I suggest this book specifically tailored for python best practices? https://jeffknupp.com/writing-idiomatic-python-ebook/

Its a wonderful read. Will really unleash the pythonista inside of all us!

If you really want to go deeper, I suggest these as well:

https://goo.gl/CY6zPu https://goo.gl/UbMrTb

Those shortened links take you to amazon (not affiliated in any way, FYI, just though the length of the URLs was obnoxious)

Those are the definitive python programming books I came up with anyway.

While we are at, I have to say once I learned to really code Pythonically I find that I can apply the PEP8 standards to almost any language. Admittedly, I, like John Siracusa, am a top level language debutante and don't live in C or C++ production code (I sometimes use objc but swift is...easier :). I remember learning C, and thanks to arduino I certainly using some varient of C/c++ there more heavily, but my coding style follows more or less the pythonic standard (with PEP8 being the backbone of that).

food for thought, people of hacker news!

2 comments

> Those shortened links take you to amazon

Just FYI: Hacker News already shortens links, no need to pass them through a 3rd party service. I personally prefer seeing a readable domain name before clicking (as I'm sure many others do as well).

Had no idea. I do appreciate this. I must of missed the 'splainer. I'll remember that for next time.
Just FYI, you can remove all the parameters from Amazon URLs and they still work. EG: https://www.amazon.com/Fluent-Python-Concise-Effective-Progr...

You can also emit the title: https://www.amazon.com/dp/1491946008/ works fine.

And yet another trick for shortening Amazon links: http://amzn.com/1491946008
But then the same question as with other short URLs appears: Does amzn.com really belong to amazon.com, or is it a third-party service that may redirect you somewhere else at will?

The point is, I don't care whether amzn.com really belongs to amazon.com or not. I want to check a domain quickly without having to research that kind of stuff.

Thanks for sharing these. I've been writing a lot of python code solo lately and have started to worry about how to make it more pythonic so it's maintainable and comprehensible to any future collaborators.