Why is a non-zero 'aware' datetime instance still falsey?

The documentation for Python regarding aware and naive time objects says:

A datetime object d is aware if both of the following hold:

d.tzinfo is not None

d.tzinfo.utcoffset(d) does not return None

Otherwise, d is naive.

I have the following code:

from datetime import datetime, timezone

d = datetime.fromtimestamp(0, tz=timezone.utc)
assert d.tzinfo
assert d.tzinfo.utcoffset(d)  # Fails

The second assertion failed, so I did some investigating:

d = datetime.fromtimestamp(0, tz=timezone.utc)
assert d.tzinfo
assert d.tzinfo.utcoffset(d) is not None  # Passes

This time, the assertions passed.

This seems like it's consistent with the rest of how python works (the empty string "" is False; a zero-length list [] is False; etc.), but time isn't like those other things. Yes, the epoch is arguably on a ratio scale with zero arbitrarily set, so you might expect that particular instance in time would be falsey even though it's not None. However, if you create an instance set to a non-zero UTC value, it still won't pass the assertion:

dt = datetime.now(tz=timezone.utc)
assert d.tzinfo
assert d.tzinfo.utcoffset(d)  # Fails

I don't understand why this is the case, but I'm relatively new to Python - Am I missing something?

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum