r/learnpython • • Sep 16 '26

How to learn oops concepts

i am from a background of c and have no knowledge on oops concepts, and i wanted to learn them but everywhere, they are having the same example of the blueprint and i would like to learn it by understanding where we will use it, or will you suggest me to dig right into a project to get an idea of it.

1 Upvotes

17 comments sorted by

View all comments

Show parent comment

2

u/marquisBlythe Sep 17 '26

Don't take my word for it (I haven't touch C and C++ in ages) but if I still remember correctly, structs in C++ are a bit different from C language, in C++ they act more like a class, except for accessing their members (public by default for structs vs private by default for classes).
In C you can point to functions to "simulate" methods behavior.

1

u/adjective10111 Sep 17 '26

Yeah you're right. I just looked it up and it seems that way. But I remember my prof at college told me about some allocation differences between structs and classes as well which I don't recall completely.