[docs] [issue8822] datetime naive and aware types should have a well-defined definition that can be cross-referenced

Alexander Belopolsky report at bugs.python.org
Mon Sep 12 22:50:38 CEST 2011

Alexander Belopolsky <alexander.belopolsky at gmail.com> added the comment:

On Mon, Sep 12, 2011 at 4:36 PM, anatoly techtonik
<report at bugs.python.org> wrote:
> 5. Mention the fact: By default all objects are "naive", by definition, because they don't have any
> TZ information, and there are no classes in stdlib that provide this info (tzclass implemetations)

This is simply wrong: in py3k we have the timezone class that
implements tzinfo interface.

> 6. Answer the questions: How to make non-naive object? How to detect if object of naive or aware?

I would go one step further: we should review the examples in datetime
module documentation and use aware datetime objects unless the point
of the example is to demonstrate a naive datetime.  We should also
replace examples that use sample implementations of tzinfo to use the
timezone class.


Python tracker <report at bugs.python.org>

More information about the docs mailing list