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) *  |
Date: 2016-03-10 11:18 |
I suggest to use the EURO SIGN € (U+20ac). |
|
|
msg261504 - (view) |
Author: Georg Brandl (georg.brandl) *  |
Date: 2016-03-10 15:19 |
Sure! |
|
|
msg261527 - (view) |
Author: Alexander Belopolsky (belopolsky) *  |
Date: 2016-03-10 22:36 |
Wouldn't '\N{SNAKE}' look more pythonic? 😀 >>> hex(ord('🐍')) '0x1f40d' |
|
|
msg261532 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
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) *  |
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) *  |
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)  |
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) *  |
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)  |
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) *  |
Date: 2016-03-23 17:42 |
Agreed. Good catch. |
|
|