This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: bug in unichr() documentation
Type: Stage:
Components: Documentation Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: fdrake Nosy List: fdrake, jafo, lemburg, mkz
Priority: normal Keywords:

Created on 2005-02-11 13:54 by mkz, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
unichr-doc.diff mkz, 2005-02-11 14:38 Doc update
Messages (5)
msg24257 - (view) Author: Marko Kreen (mkz) Date: 2005-02-11 13:54
http://www.python.org/doc/2.4/lib/built-in-funcs.html:

> Return the Unicode string of one character whose
Unicode    
> code is the integer i.
> [...]
> The argument must be in the range [0..65535], inclusive.

unichr.__doc_ says:
> Return a Unicode string of one character with ordinal
i; 0 <= i <= 0x10ffff.

Which is correct?
msg24258 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2005-02-11 14:03
Logged In: YES 
user_id=38388

Whether unichr() handles the UCS2 or the UCS4 range depends
on the configuration option you set at Python compile time.
Perhaps we should extend the documentation to mention this
difference ?!

Doc patches are welcome :-)
msg24259 - (view) Author: Marko Kreen (mkz) Date: 2005-02-11 14:38
Logged In: YES 
user_id=894541

Main problem for me was that the 65535 hints that unichr()
may want UTF-16 values not Unicode.  That was rather
confusing.

Ok, attached path clarifies unichr() range.
msg24260 - (view) Author: Sean Reifschneider (jafo) * (Python committer) Date: 2005-04-20 02:57
Logged In: YES 
user_id=81797

Fred: The attached patch looks good to me.
msg24261 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2005-05-25 05:43
Logged In: YES 
user_id=3066

Fixed in Doc/lib/libfuncs.tex revisions 1.182, 1.175.2.3
History
Date User Action Args
2022-04-11 14:56:09adminsetgithub: 41563
2005-02-11 13:54:00mkzcreate