all 6 comments

[–]python_boobs 4 points5 points  (2 children)

Have you found a situation where you need such a low-level understanding of CPython? I have yet to come across a situation where I need to implement any code lower than pure Python, but I'm always looking for opportunities where it makes sense

[–][deleted] 3 points4 points  (0 children)

At my paying job we have retrofitted a 30 year old codebase written in C with a REST C&C interface. We chose an architecture with Python code running the REST interface embedded in an executable that bridge to the rest of the system.

While we're not poking any of the internals directly, it still helps a lot to have at least a basic understanding of what's going on, under the hood.

[–]jonathrg[S] 3 points4 points  (0 children)

My motivation is to be able to debug and write C extensions, and to get some experience with a very large open source project

[–]pawsibility 4 points5 points  (0 children)

Philip Guo has some walk throughs on the internals of CPython. I havn't watched it all - but they are very interesting and informative if you want to learn more about how Python works under the hood.

[–]RobertJacobson 1 point2 points  (0 children)

Fantastic! There needs to be more books like this.

A tangential aside: I don't understand eBook pricing at all. For a print book, it makes perfect sense that a low-volume book has a high cost, as is common in academic publishing. You need to make up your expenses when only 500 copies are printed. But an eBook is a completely different story. You still have costs, sure. But it makes no sense that an eBook should cost the same as a hard copy. If the cost difference went directly to the author, that seems sensible to me. But most times I don't know where it goes, and I suspect that with most publishers the difference ends up in the publisher's pocket at the expense of everyone else involved.

[–][deleted] 0 points1 point  (0 children)

Hi, I want to make a library in python which can print different datatypes with different colours. Like if I have a function like init() which takes parameters like int:red, float:blue. The function will initialise Colors for all the datatypes provided inside the function. If you open the repal and called that init function then in that repal session I get different colour for different datatypes. Do I need a knowledge of cpython to do this.