Issue 26525: Documentation of ord(c) easy to misread (original) (raw)

process

Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: Susan Sun, belopolsky, benjamin.peterson, docs@python, georg.brandl, gladman, ncoghlan, python-dev, rhettinger, serhiy.storchaka, terry.reedy, vstinner
Priority: normal Keywords: easy

Created on 2016-03-10 08:51 by gladman, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (12)
msg261485 - (view) Author: (gladman) Date: 2016-03-10 08:51
It is very easy to misread the greek 'nu' used in the ord(c) documentation as ord('v') (i.e. an alphabetic 'v'). This can lead the reader to draw a wrong conclusion about the behaviour of the function. Would it not be better if this example used a greek letter that is less easy to misread in this way? Or, perhaps, add extra text indicating that the greek letter 'nu' is being referenced?
msg261493 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-03-10 11:18
I suggest to use the EURO SIGN € (U+20ac).
msg261504 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2016-03-10 15:19
Sure!
msg261527 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2016-03-10 22:36
Wouldn't '\N{SNAKE}' look more pythonic? 😀 >>> hex(ord('🐍')) '0x1f40d'
msg261532 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-03-10 23:37
'🐍' is astral character and not all systems have fonts that support it installed by default. It can be hard to render it in TeX.
msg261561 - (view) Author: Susan Sun (Susan Sun) Date: 2016-03-11 10:57
This was changed in the following commit. changeset: 95165:f6c6304c8193 user: Benjamin Peterson date: Tue Mar 24 12:12:44 2015 -0400 summary: change Σ to ν for obscure joke reasons https://twitter.com/ncoghlan_dev/status/579173053793353728
msg261621 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2016-03-12 00:18
The easily misread "ord('ν')" could be expanded to "ord('ν') (Greek nu)" but I agree that "ord('€') (Euro sign)" would be either better for a global doc. (And the return is 8364.) If no objection (Benjamin? Nick?), I am willing to do it for 3.5/6 There is no need to change the 2.7 version "ord(u'\u2020') returns 8224."
msg261682 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2016-03-13 07:24
I concur that the Euro sign would be best (more recognizable and more likely to be renderable in a given font).
msg262099 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-03-21 01:19
New changeset c7071c9b8c33 by Terry Jan Reedy in branch '3.5': Issue #26525: Change ord example from nu to more easily recognized Euro sign. https://hg.python.org/cpython/rev/c7071c9b8c33
msg262274 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-03-23 14:57
Reversed to ord() function chr() still uses 'ν' as an example. I think both functions should use the same example.
msg262290 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-03-23 17:40
New changeset f3bd94c57cd8 by Terry Jan Reedy in branch '3.5': Issue #26525: Change chr example to match change in ord example. https://hg.python.org/cpython/rev/f3bd94c57cd8
msg262291 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2016-03-23 17:42
Agreed. Good catch.
History
Date User Action Args
2022-04-11 14:58:28 admin set github: 70712
2016-03-23 17:42:15 terry.reedy set status: open -> closedmessages: +
2016-03-23 17:40:53 python-dev set messages: +
2016-03-23 14:57:46 serhiy.storchaka set status: closed -> openmessages: +
2016-03-21 01:19:41 terry.reedy set status: open -> closedresolution: fixedstage: patch review -> resolved
2016-03-21 01:19:16 python-dev set nosy: + python-devmessages: +
2016-03-21 01:07:57 terry.reedy set assignee: docs@python -> terry.reedy
2016-03-13 07:24:51 rhettinger set nosy: + rhettingermessages: +
2016-03-12 00🔞21 terry.reedy set versions: + Python 3.6nosy: + terry.reedymessages: + type: enhancementstage: patch review
2016-03-11 10:57:28 Susan Sun set nosy: + ncoghlan, Susan Sun, benjamin.petersonmessages: +
2016-03-10 23:37:38 serhiy.storchaka set nosy: + serhiy.storchakamessages: +
2016-03-10 22:36:31 belopolsky set nosy: + belopolskymessages: +
2016-03-10 15:19:57 georg.brandl set messages: +
2016-03-10 11🔞46 vstinner set keywords: + easynosy: + vstinnermessages: +
2016-03-10 09:22:21 serhiy.storchaka set nosy: + georg.brandl
2016-03-10 08:51:32 gladman create