title: How does python store objects in memory
body: <p>It is my understanding that a list is a block of contiguous memory locations that contain pointers to the element values in memory. As shown below: </p>
  
  <p><a href="https://i.stack.imgur.com/ID5E8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ID5E8.png" alt="list in memory"></a></p>
  
  <p>My question is whether its the same with objects in memory ie: 
  suppose I have a point class with an init method implemented as follows: </p>
  
  <pre><code>class Point: 
      def __init__(self, x, y): 
          self.x = x
          self.y = y
  </code></pre>
  
  <p>And I create a new point object:</p>
  
  <pre><code>p = Point(4,6)
  </code></pre>
  
  <p>Would the pointer to <code>p.x</code> and the pointer to <code>p.y</code> be next to each other in memory? </p>