* **Module 'datetime' provides 'date' `<D>`, 'time' `<T>`, 'datetime' `<DT>` and 'timedelta' `<TD>` classes. All are immutable and hashable.**
* **Time and datetime can be 'aware' `<a>`, meaning they have defined timezone, or 'naive' `<n>`, meaning they don't.**
* **Time and datetime objects can be 'aware' `<a>`, meaning they have defined timezone, or 'naive' `<n>`, meaning they don't.**
* **If object is naive, it is presumed to be in the system's timezone.**
```python
@ -1259,7 +1259,7 @@ class MySequence:
### Collections.abc.Sequence
* **It's a richer interface than the basic sequence.**
* **Extending it generates iter(), contains(), reversed(), index(), and count().**
* **Unlike `'abc.Iterable'` and `'abc.Collection'`, it is not a duck type. That is why `'issubclass(MySequence, collections.abc.Sequence)'` would return False even if MySequence had all the methods defined.**
* **Unlike `'abc.Iterable'` and `'abc.Collection'`, it is not a duck type. That is why `'issubclass(MySequence, abc.Sequence)'` would return False even if MySequence had all the methods defined.**
<li><strong>Module 'datetime' provides 'date' <codeclass="apache hljs"><spanclass="hljs-section"><D></span></code>, 'time' <codeclass="apache hljs"><spanclass="hljs-section"><T></span></code>, 'datetime' <codeclass="apache hljs"><spanclass="hljs-section"><DT></span></code> and 'timedelta' <codeclass="apache hljs"><spanclass="hljs-section"><TD></span></code> classes. All are immutable and hashable.</strong></li>
<li><strong>Time and datetime can be 'aware' <codeclass="apache hljs"><spanclass="hljs-section"><a></span></code>, meaning they have defined timezone, or 'naive' <codeclass="apache hljs"><spanclass="hljs-section"><n></span></code>, meaning they don't.</strong></li>
<li><strong>Time and datetime objects can be 'aware' <codeclass="apache hljs"><spanclass="hljs-section"><a></span></code>, meaning they have defined timezone, or 'naive' <codeclass="apache hljs"><spanclass="hljs-section"><n></span></code>, meaning they don't.</strong></li>
<li><strong>If object is naive, it is presumed to be in the system's timezone.</strong></li>
</ul><pre><codeclass="python language-python hljs"><spanclass="hljs-keyword">from</span> datetime <spanclass="hljs-keyword">import</span> date, time, datetime, timedelta
<li><strong>It's a richer interface than the basic sequence.</strong></li>
<li><strong>Extending it generates iter(), contains(), reversed(), index(), and count().</strong></li>
<li><strong>Unlike <codeclass="python hljs"><spanclass="hljs-string">'abc.Iterable'</span></code> and <codeclass="python hljs"><spanclass="hljs-string">'abc.Collection'</span></code>, it is not a duck type. That is why <codeclass="python hljs"><spanclass="hljs-string">'issubclass(MySequence, collections.abc.Sequence)'</span></code> would return False even if MySequence had all the methods defined.</strong></li>
<li><strong>Unlike <codeclass="python hljs"><spanclass="hljs-string">'abc.Iterable'</span></code> and <codeclass="python hljs"><spanclass="hljs-string">'abc.Collection'</span></code>, it is not a duck type. That is why <codeclass="python hljs"><spanclass="hljs-string">'issubclass(MySequence, abc.Sequence)'</span></code> would return False even if MySequence had all the methods defined.</strong></li>