Currently the datetime docs say:

> An object of type time or datetime may be naive or aware. A datetime
object d is aware if d.tzinfo is not None and d.tzinfo.utcoffset(d) does
not return None. If d.tzinfo is None, or if d.tzinfo is not None but
d.tzinfo.utcoffset(d) returns None, d is naive. A time object t is aware if
t.tzinfo is not None and t.tzinfo.utcoffset(None) does not return None.
Otherwise, t is naive.

> https://docs.python.org/3/library/datetime.html#available-types

Would an issue/PR be welcome to encode that logic into code? The docs could
then read:

> An object of type time or datetime may be naive or aware. Aware objects
have their "aware/tzaware/tz_aware" attribute set to True, and if naive:
False.

Nick
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/4G5L5YW4V7X2APBVK4DBTT22IDKIZXME/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to