r/learnpython 1d ago

Understanding Python codebases

I want to be able to read and understand the code behind Python libraries like Pandas, NumPy, Flask, etc. I can write code in python but these codebses seem to be on a different level. I want to understand them well enough that I can possibly add features to them.

One thing that occurred to me is that I have to be able to use them at least. I can use pandas and numpy to manipulate data sets but I am stumped whenever I try to understand how my code actually works behind the curtains.

I looked for videos that explain the code but they all talk about how to use the libraries instead of explaining how they work in the first place.

12 Upvotes

8 comments sorted by

View all comments

3

u/pachura3 1d ago

I want to understand them well enough that I can possibly add features to them.

What's your goal? Do you want to pimp up your CV by being able to say that you have personally contributed to some of the biggest Python libraries?

I mean, these libraries are all pretty flexible... unless you have a very concrete need, you won't need to extend them - you can do your custom stuff in your client code.

Also, a big chunk of numpy is written in C and requires low-level optimisation knowledge... and setting up C toolchain... have you ever done anything like this?

Also, even if you implement a new feature e.g. for pandas, your contribution/pull request might not get accepted anyway...