bpo-27200: fix faq/programming and datetime by marco-buttu · Pull Request #401 · python/cpython
Conversation
This PR partially fixes bpo-27200. Partially and not completely, because I followed the suggestion of @ezio-melotti to split the patch in several patches. This PR is the 2nd of the series, the first one was #240.
Here I changed the name of the file tzinfo-examples.py to tzinfo_examples.py, for two reasons. The first one is the PEP8 conformity. The second one is that tzinfo-examples could not be imported to execute the interactive example. It is not just a problem of doctest. The real problem is that the reader actually can not execute the example without renaming tzinfo-examples in something else (without the -).
| .. doctest:: | ||
|
|
||
| >>> from datetime import datetime, timezone | ||
| >>> from tzinfo_examples import HOUR, Eastern |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have just added the two lines above, and deindented all the example of 1 whitespace, to fit the doctest directive indentation.
This was referenced