[Python-checkins] bpo-34512: Document platform-specific strftime() behavior for non-ASCII format strings (GH-8948)
Miss Islington (bot)
webhook-mailer at python.org
Sat Jan 12 12:27:33 EST 2019
https://github.com/python/cpython/commit/678c5c07521caca809b1356d954975e6234c49ae
commit: 678c5c07521caca809b1356d954975e6234c49ae
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-01-12T09:27:30-08:00
summary:
bpo-34512: Document platform-specific strftime() behavior for non-ASCII format strings (GH-8948)
(cherry picked from commit 1cffd0eed313011c0c2bb071c8affeb4a7ed05c7)
Co-authored-by: Alexey Izbyshev <izbyshev at ispras.ru>
files:
M Doc/library/datetime.rst
diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst
index db3a6522c24f..121f73bbe852 100644
--- a/Doc/library/datetime.rst
+++ b/Doc/library/datetime.rst
@@ -2034,6 +2034,12 @@ calls the platform C library's :func:`strftime` function, and platform
variations are common. To see the full set of format codes supported on your
platform, consult the :manpage:`strftime(3)` documentation.
+For the same reason, handling of format strings containing Unicode code points
+that can't be represented in the charset of the current locale is also
+platform-dependent. On some platforms such code points are preserved intact in
+the output, while on others ``strftime`` may raise :exc:`UnicodeError` or return
+an empty string instead.
+
The following is a list of all the format codes that the C standard (1989
version) requires, and these work on all platforms with a standard C
implementation. Note that the 1999 version of the C standard added additional
More information about the Python-checkins
mailing list