@@ -1209,6 +1209,9 @@ Supported operations:
12091209
12101210 Naive and aware :class: `!datetime ` objects are never equal.
12111211
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.
12121215 If both comparands are aware and have different :attr: `~.datetime.tzinfo `
12131216 attributes, the comparison acts as comparands were first converted to UTC
12141217 datetimes except that the implementation never overflows.
@@ -1222,6 +1225,9 @@ Supported operations:
12221225 Order comparison between naive and aware :class: `.datetime ` objects
12231226 raises :exc: `TypeError `.
12241227
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.
12251231 If both comparands are aware and have different :attr: `~.datetime.tzinfo `
12261232 attributes, the comparison acts as comparands were first converted to UTC
12271233 datetimes except that the implementation never overflows.
@@ -1778,8 +1784,8 @@ Naive and aware :class:`!time` objects are never equal.
17781784Order comparison between naive and aware :class: `!time ` objects raises
17791785:exc: `TypeError `.
17801786
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
17831789ignored and the base times are compared. If both comparands are aware and
17841790have different :attr: `!tzinfo ` attributes, the comparands are first adjusted by
17851791subtracting their UTC offsets (obtained from ``self.utcoffset() ``).
0 commit comments