title: python datetime difference in days and hours
body: <p>I want to compare two datetime instances and show the how many days and hours that differs. Now I do that with .days and it does seem to work but pylint complains about it.</p>
  
  <p>Is there a better way to do it since pylint complains about it?</p>
  
  <pre><code>#!/usr/bin/python
  """A test of time differences"""
  
  from datetime import datetime, timedelta
  
  REF_DATE = datetime.strptime("2015-01-01", "%Y-%m-%d")
  
  def main():
      """Main function"""
      today = datetime.now()
      tdiff = today - REF_DATE
      print("Difference is %d days %d hours" % (tdiff.days, tdiff.seconds/3600))
  
  main()
  </code></pre>
  
  <p>This is the output I get from pylint:</p>
  
  <pre><code>No config file found, using default configuration
  ************* Module test_timedelta
  E: 12,52: Instance of 'datetime' has no 'days' member (but some types could not be inferred) (maybe-no-member)
  E: 12,64: Instance of 'datetime' has no 'seconds' member (but some types could not be inferred) (maybe-no-member)
  W:  4, 0: Unused import timedelta (unused-import)
  
  
  ...
  </code></pre>