@@ -1185,6 +1185,9 @@ Supported operations:
1185
1185
that are not also :class: `!datetime ` instances, even if they represent
1186
1186
the same date.
1187
1187
1188
+ If both comparands are aware, and have the same :attr: `!tzinfo ` attribute,
1189
+ the :attr: `!tzinfo ` and :attr: `~.datetime.fold ` attributes are ignored and
1190
+ the base datetimes are compared.
1188
1191
If both comparands are aware and have different :attr: `~.datetime.tzinfo `
1189
1192
attributes, the comparison acts as comparands were first converted to UTC
1190
1193
datetimes except that the implementation never overflows.
@@ -1199,6 +1202,9 @@ Supported operations:
1199
1202
as well as a :class: `!datetime ` object and a :class: `!date ` object
1200
1203
that is not also a :class: `!datetime ` instance, raises :exc: `TypeError `.
1201
1204
1205
+ If both comparands are aware, and have the same :attr: `!tzinfo ` attribute,
1206
+ the :attr: `!tzinfo ` and :attr: `~.datetime.fold ` attributes are ignored and
1207
+ the base datetimes are compared.
1202
1208
If both comparands are aware and have different :attr: `~.datetime.tzinfo `
1203
1209
attributes, the comparison acts as comparands were first converted to UTC
1204
1210
datetimes except that the implementation never overflows.
@@ -1744,8 +1750,8 @@ Naive and aware :class:`!time` objects are never equal.
1744
1750
Order comparison between naive and aware :class: `!time ` objects raises
1745
1751
:exc: `TypeError `.
1746
1752
1747
- If both comparands are aware, and have
1748
- the same :attr: `~.time. tzinfo ` attribute, the common :attr: `!tzinfo ` attribute is
1753
+ If both comparands are aware, and have the same :attr: ` ~.time.tzinfo `
1754
+ attribute, the :attr: `! tzinfo ` and :attr: `!fold ` attributes are
1749
1755
ignored and the base times are compared. If both comparands are aware and
1750
1756
have different :attr: `!tzinfo ` attributes, the comparands are first adjusted by
1751
1757
subtracting their UTC offsets (obtained from ``self.utcoffset() ``).
0 commit comments