_
_
_
Applies for date and datetime instances.
Applies for date and datetime instances.
Applies for date and datetime instances.
Applies for date and datetime instances.
_
_
_
Applies for date and datetime instances.
Applies for date and datetime instances.
Applies for date and datetime instances.
_
Applies for time instances.
Applies for time instances.
Applies for time instances.
Applies for time instances.
_
_
_
_
_
_
_
_
_
_
_
_
_
_
Structure for C API.
All datetime objects are of PyDateTime_DateTimeType, but that can be allocated in two ways too, just like for time objects above. In addition, the plain date type is a base class for datetime, so it must also have a hastzinfo member (although it's unused there).
_
subclass of PyObject.
a pure abstract base clase
_
_
No _PyDateTime_BaseTZInfo is allocated; it's just to have something convenient to cast to, when getting at the hastzinfo member of objects starting with _PyTZINFO_HEAD.
_
_
All time objects are of PyDateTime_TimeType, but that can be allocated in two ways, with or without a tzinfo member. Without is the same as tzinfo == None, but consumes less memory. _PyDateTime_BaseTime is an internal struct used to allocate the right amount of space for the "without" case.
The datetime and time types have hashcodes, and an optional tzinfo member, present if and only if hastzinfo is true.
mirror datetime.h