datetime as subclass of date

Skip Montanaro skip at pobox.com
Fri Jan 24 11:03:15 EST 2014


One thing that always reinforced my notion that
issubclass(datetime.datetime, datetime.date) should be False is that
the presence of of date and time methods gives me a mental image of
delegation, not inheritance. That is, it "feels" like a datetime
object is the aggregation of a date object and a time object, not a
specialized date object with some added time machinery mixed in.

Skip



More information about the Python-list mailing list