title: When importing from a python module is it a class that gets imported or a function?
body: <p>In Code Academy's python training there's a lesson about importing datetime. The syntax is: </p>
  
  <p>from <em>datetime</em> import <em>datetime</em></p>
  
  <p>After importation I'm able to write <strong>now = datetime.now()</strong> and evaluate <strong>now.hour</strong>, <strong>now.minute</strong> and <strong>now.second</strong>. I see in the datetime module that .now (), .hour, .minute and .second are defined in the datetime class. Which leads me to interpret the import statement as saying: </p>
  
  <p>from <em>datetime module</em> import <em>datetime class</em> </p>
  
  <p>And so it seems that access to the datetime class is what gave me access to the .now(), .hour, .minute and .second definitions.</p>
  
  <p>But later I discovered that I'm also able to evaluate <strong>now.month</strong>, <strong>now.day</strong> and <strong>now.year</strong>. Even though .month .day and .year are <strong>not</strong> in the datetime class. Rather they're in a different class called <strong>date</strong>.</p>
  
  <p>How could I access definitions from the date class when it seems I only imported the datetime class?</p>