[issue39710] "will be returned as unicode" reminiscent from Python 2
Julien Palard
report at bugs.python.org
Fri Feb 21 10:58:28 EST 2020
New submission from Julien Palard <julien+python at palard.fr>:
In https://docs.python.org/3/library/calendar.html#calendar.LocaleTextCalendar I read "If this locale includes an encoding all strings containing month and weekday names will be returned as unicode."
`unicode` here is a mention of the `unicode` type from Python 2 which does no longer exists, so the whole sentence can just be removed.
It happen also in the next paragraph, and twice in Lib/calendar.py.
In Python 2:
>>> print type(calendar.LocaleTextCalendar(locale="C").formatmonth(2020, 1))
<type 'str'>
>>> print type(calendar.LocaleTextCalendar(locale="en_US.UTF8").formatmonth(2020, 1))
<type 'unicode'>
In Python 3:
>>> print(type(calendar.LocaleTextCalendar(locale="C").formatmonth(2020, 1)))
<class 'str'>
>>> print(type(calendar.LocaleTextCalendar(locale="en_US.UTF8").formatmonth(2020, 1)))
<class 'str'>
----------
assignee: docs at python
components: Documentation
keywords: easy
messages: 362410
nosy: docs at python, mdk
priority: normal
severity: normal
status: open
title: "will be returned as unicode" reminiscent from Python 2
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39710>
_______________________________________
More information about the Python-bugs-list
mailing list