classification
Title: "will be returned as unicode" reminiscent from Python 2
Type: Stage: patch review
Components: Documentation Versions: Python 3.9, Python 3.8, Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Wicken, docs@python, dorosch, mdk
Priority: normal Keywords: easy, newcomer friendly, patch

Created on 2020-02-21 15:58 by mdk, last changed 2020-02-28 20:01 by Wicken.

Pull Requests
URL Status Linked Edit
PR 18619 open dorosch, 2020-02-23 13:44
PR 18691 closed Wicken, 2020-02-28 20:01
Messages (1)
msg362410 - (view) Author: Julien Palard (mdk) * (Python committer) Date: 2020-02-21 15:58
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'>
History
Date User Action Args
2020-02-28 20:01:15Wickensetpull_requests: + pull_request18053
2020-02-28 20:00:10Wickensetpull_requests: - pull_request18050
2020-02-28 19:57:51Wickensetnosy: + Wicken
pull_requests: + pull_request18050
2020-02-23 13:44:29doroschsetkeywords: + patch
nosy: + dorosch

pull_requests: + pull_request17984
stage: needs patch -> patch review
2020-02-22 21:00:22terry.reedysetkeywords: + newcomer friendly
stage: needs patch
versions: + Python 3.7, Python 3.8, Python 3.9
2020-02-21 15:58:28mdkcreate