title: BeautifulSoup : Weird behavior with <p>
body: <p>I've the following HTML content : </p>
  
  <pre><code>content  = """
  &lt;div&gt;
  
    &lt;div&gt; &lt;div&gt;div A&lt;/div&gt; &lt;/div&gt;
    &lt;p&gt;P A&lt;/p&gt;
  
    &lt;div&gt; &lt;div&gt;div B&lt;/div&gt; &lt;/div&gt;   
    &lt;p&gt; P B1&lt;/p&gt;
    &lt;p&gt; P B2&lt;/p&gt;
  
    &lt;div&gt; &lt;div&gt;div C&lt;/div&gt; &lt;/div&gt;
    &lt;p&gt; P C1 &lt;div&gt;NODE&lt;/div&gt; &lt;/p&gt;
  
  &lt;/div&gt;
  """
  </code></pre>
  
  <p>Which can be seen like that (Not sure if it helps but I like diagram) : 
  <a href="https://i.stack.imgur.com/kbWTo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kbWTo.png" alt="enter image description here"></a></p>
  
  <p>If I use the following code : </p>
  
  <pre><code>soup = bs4.BeautifulSoup(content, "lxml")
  firstDiv = soup.div
  allElem = firstDiv.findAll( recursive = False)
  for i, el in enumerate(allElem):
      print "element ", i , " : ", el
  </code></pre>
  
  <p>I get this : </p>
  
  <pre><code>element  0  :  &lt;div&gt; &lt;div&gt;div A&lt;/div&gt; &lt;/div&gt;
  element  1  :  &lt;p&gt;P A&lt;/p&gt;
  element  2  :  &lt;div&gt; &lt;div&gt;div B&lt;/div&gt; &lt;/div&gt;
  element  3  :  &lt;p&gt; P B1&lt;/p&gt;
  element  4  :  &lt;p&gt; P B2&lt;/p&gt;
  element  5  :  &lt;div&gt; &lt;div&gt;div C&lt;/div&gt; &lt;/div&gt;
  element  6  :  &lt;p&gt; P C1 &lt;/p&gt;
  element  7  :  &lt;div&gt;NODE&lt;/div&gt;
  </code></pre>
  
  <p>As you can see unlike elements 0, 2 or 5, the element 6 doesn't contains its children. If I change its <code>&lt;p&gt;</code> to <code>&lt;b&gt;</code> or <code>&lt;div&gt;</code> then it acts as excepted. Why this little difference with <code>&lt;p&gt;</code>  ? I'm still having that problem (if this is one?) upgrading from 4.3.2 to 4.4.6.  </p>