@@ -1209,6 +1209,9 @@ Supported operations:
1209
1209
1210
1210
Naive and aware :class: `!datetime ` objects are never equal.
1211
1211
1212
+ If both comparands are aware, and have the same :attr: `!tzinfo ` attribute,
1213
+ the :attr: `!tzinfo ` and :attr: `~.datetime.fold ` attributes are ignored and
1214
+ the base datetimes are compared.
1212
1215
If both comparands are aware and have different :attr: `~.datetime.tzinfo `
1213
1216
attributes, the comparison acts as comparands were first converted to UTC
1214
1217
datetimes except that the implementation never overflows.
@@ -1222,6 +1225,9 @@ Supported operations:
1222
1225
Order comparison between naive and aware :class: `.datetime ` objects
1223
1226
raises :exc: `TypeError `.
1224
1227
1228
+ If both comparands are aware, and have the same :attr: `!tzinfo ` attribute,
1229
+ the :attr: `!tzinfo ` and :attr: `~.datetime.fold ` attributes are ignored and
1230
+ the base datetimes are compared.
1225
1231
If both comparands are aware and have different :attr: `~.datetime.tzinfo `
1226
1232
attributes, the comparison acts as comparands were first converted to UTC
1227
1233
datetimes except that the implementation never overflows.
@@ -1778,8 +1784,8 @@ Naive and aware :class:`!time` objects are never equal.
1778
1784
Order comparison between naive and aware :class: `!time ` objects raises
1779
1785
:exc: `TypeError `.
1780
1786
1781
- If both comparands are aware, and have
1782
- the same :attr: `~.time. tzinfo ` attribute, the common :attr: `!tzinfo ` attribute is
1787
+ If both comparands are aware, and have the same :attr: ` ~.time.tzinfo `
1788
+ attribute, the :attr: `! tzinfo ` and :attr: `!fold ` attributes are
1783
1789
ignored and the base times are compared. If both comparands are aware and
1784
1790
have different :attr: `!tzinfo ` attributes, the comparands are first adjusted by
1785
1791
subtracting their UTC offsets (obtained from ``self.utcoffset() ``).
0 commit comments