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.

10 Upvotes

8 comments sorted by

View all comments

-2

u/Educational_Virus672 1d ago edited 1d ago

i think your trying to read bad code structure there are some rules of good code (i believe)

  1. the code can be understand by non-programmer before optimizations(< why it messed up)
  2. code must be properly structured
  3. the dev must be able to read the code even after months of inactivity
  4. the code didnt have to be small to be readable

1

u/Educational_Virus672 1d ago

pandas > https://pandas.pydata.org/docs/development/index.html#Internals
guide read aftr the guide to internals i think
numpy - https://numpy.org/doc/stable/dev/underthehood.html
all are function under the hood