@@ -1193,6 +1193,9 @@ Supported operations:
11931193 that are not also :class: `!datetime ` instances, even if they represent
11941194 the same date.
11951195
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.
11961199 If both comparands are aware and have different :attr: `~.datetime.tzinfo `
11971200 attributes, the comparison acts as comparands were first converted to UTC
11981201 datetimes except that the implementation never overflows.
@@ -1207,6 +1210,9 @@ Supported operations:
12071210 as well as a :class: `!datetime ` object and a :class: `!date ` object
12081211 that is not also a :class: `!datetime ` instance, raises :exc: `TypeError `.
12091212
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.
12101216 If both comparands are aware and have different :attr: `~.datetime.tzinfo `
12111217 attributes, the comparison acts as comparands were first converted to UTC
12121218 datetimes except that the implementation never overflows.
@@ -1752,8 +1758,8 @@ Naive and aware :class:`!time` objects are never equal.
17521758Order comparison between naive and aware :class: `!time ` objects raises
17531759:exc: `TypeError `.
17541760
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
17571763ignored and the base times are compared. If both comparands are aware and
17581764have different :attr: `!tzinfo ` attributes, the comparands are first adjusted by
17591765subtracting their UTC offsets (obtained from ``self.utcoffset() ``).
0 commit comments