@@ -1193,6 +1193,9 @@ Supported operations:
1193
1193
that are not also :class: `!datetime ` instances, even if they represent
1194
1194
the same date.
1195
1195
1196
+ If both comparands are aware, and have the same :attr: `!tzinfo ` attribute,
1197
+ the :attr: `!tzinfo ` and :attr: `~.datetime.fold ` attributes are ignored and
1198
+ the base datetimes are compared.
1196
1199
If both comparands are aware and have different :attr: `~.datetime.tzinfo `
1197
1200
attributes, the comparison acts as comparands were first converted to UTC
1198
1201
datetimes except that the implementation never overflows.
@@ -1207,6 +1210,9 @@ Supported operations:
1207
1210
as well as a :class: `!datetime ` object and a :class: `!date ` object
1208
1211
that is not also a :class: `!datetime ` instance, raises :exc: `TypeError `.
1209
1212
1213
+ If both comparands are aware, and have the same :attr: `!tzinfo ` attribute,
1214
+ the :attr: `!tzinfo ` and :attr: `~.datetime.fold ` attributes are ignored and
1215
+ the base datetimes are compared.
1210
1216
If both comparands are aware and have different :attr: `~.datetime.tzinfo `
1211
1217
attributes, the comparison acts as comparands were first converted to UTC
1212
1218
datetimes except that the implementation never overflows.
@@ -1752,8 +1758,8 @@ Naive and aware :class:`!time` objects are never equal.
1752
1758
Order comparison between naive and aware :class: `!time ` objects raises
1753
1759
:exc: `TypeError `.
1754
1760
1755
- If both comparands are aware, and have
1756
- the same :attr: `~.time. tzinfo ` attribute, the common :attr: `!tzinfo ` attribute is
1761
+ If both comparands are aware, and have the same :attr: ` ~.time.tzinfo `
1762
+ attribute, the :attr: `! tzinfo ` and :attr: `!fold ` attributes are
1757
1763
ignored and the base times are compared. If both comparands are aware and
1758
1764
have different :attr: `!tzinfo ` attributes, the comparands are first adjusted by
1759
1765
subtracting their UTC offsets (obtained from ``self.utcoffset() ``).
0 commit comments