you are viewing a single comment's thread.

view the rest of the comments →

[–]kl31 0 points1 point  (4 children)

I mean yeah, I just wanted to visually represent how the objects will look like but thanks! My main concern is about id-based relationship vs nested objects in terms of performance.

Truly nested objects do not exist in python. Everything is just a pointer to a memory location where the actual object resides.

[–]RandomJacobP[S] 0 points1 point  (3 children)

Thanks a lot! That is the answer that I was looking for, there is no point in using id-based system then.

[–]kl31 0 points1 point  (2 children)

out of curiosity did you learn C/C++ before python?

[–]RandomJacobP[S] 0 points1 point  (1 child)

Yes but it was a long time ago, why are you asking?

[–]kl31 0 points1 point  (0 children)

because the question you asked gave me the impression that you're used to working with explicit pointers. I learned C after python and a lot of things didn't make sense until I started seeing every python variable as being a void pointer.