New submission from Julien Palard <julien+pyt...@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@python
components: Documentation
keywords: easy
messages: 362410
nosy: docs@python, mdk
priority: normal
severity: normal
status: open
title: "will be returned as unicode" reminiscent from Python 2

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39710>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to