Live data from Hacker News

Show HN: I wrote a book about Python

pragprog.com

41–47 of 47 posts

Re: Show HN: I wrote a book about Python

#41

Earlier quoted context omitted.

Does the wonderful bicycle analogy have grounding in the experience of Python? Are there things about Python that make it great as a general programming languages, but not for mobile. Perhaps the ease with which people reach for libs that wrap C? I dunno.

For starters, being just-in-time compiled makes for a nice short feedback cycle when you're developing. That's great for scripting, data science, exploratory development, even Web development since it facilitates a nice hot code reloading experience. But it also completely disqualifies it from running on iOS, which enforces a (understandable, IMO) ban on JITing. I'm not interested in arguing about the relative merits…

Kivy does all these things, although it is short on developers.

Re: Show HN: I wrote a book about Python

#44
post #13

On "Calling Other Programs with subprocess": It pains me that the default way to run an external command ( subprocess.run ) doesn't raise an exception for non-zero exit code violating the Zen of Python: "Errors should never pass silently. Unless explicitly silenced." Would it make it too advanced to show subprocess.Popen example with stdin=PIPE for providing input instead of writing to disk? Or an example on how to f…

Just pass check=True as an argument to subprocess.run and it will raise a CalledProcessError .

The issue is that `check=False` by default for the `run()` function.

Re: Show HN: I wrote a book about Python

#45
post #43

The chapters look good! How would you compare this book to "Fluent Python"? Similar level? I like "Fluent Python" and it is the recommendation I currently give to my students who want something intermediate.

I've not read Fluent Python, but its table of contents looks quite extensive, and covers a lot of good ground.

Intuitive Python does cover some things that aren't present in Fluent Python (as far as I can tell): checking your code for errors with flake8 + mypy, using pdb to debug, profiling with cprofile, running external programs with subprocess, using the sqlite3 module, tempfile module, datetime + timezones, the Python official Docker images, and pip.

Fluent Python's ~800 pages really give great coverage for much of the standard library and patterns your students will see in wild Python, but the more compact ~140 page Intuitive Python might layer on some additional knowledge too.

Re: Show HN: I wrote a book about Python

#46
post #30

Seeing as your title managed to land under the same publishing umbrella as (one of my own favorite programming books as well) The Pragmatic Programmer, do you have insight as to whether your title will also be made available on the O'Reilly platform?

In case it's helpful for anyone else, here's what publishing team had to say:

"Yes, your book will eventually show up on the O'Reilly Learning Platform, but it'll be a while still. Most of our books first appear there four to eight weeks after they go into print. So just keep an eye out on OLP, because it's coming."

Post reply on HN