[ python-Bugs-1120777 ] bug in unichr() documentation

SourceForge.net noreply at sourceforge.net
Wed Apr 20 04:57:25 CEST 2005


Bugs item #1120777, was opened at 2005-02-11 13:54
Message generated for change (Comment added) made by jafo
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1120777&group_id=5470

Category: Documentation
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Marko Kreen (mkz)
>Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: bug in unichr() documentation

Initial Comment:
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?


----------------------------------------------------------------------

>Comment By: Sean Reifschneider (jafo)
Date: 2005-04-20 02:57

Message:
Logged In: YES 
user_id=81797

Fred: The attached patch looks good to me.

----------------------------------------------------------------------

Comment By: Marko Kreen (mkz)
Date: 2005-02-11 14:38

Message:
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.

----------------------------------------------------------------------

Comment By: M.-A. Lemburg (lemburg)
Date: 2005-02-11 14:03

Message:
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 :-)

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1120777&group_id=5470


More information about the Python-bugs-list mailing list