[Patches] [ python-Patches-413333 ] Improved support for unicode conversions
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 20 Sep 2001 03:51:56 -0700
Patches item #413333, was opened at 2001-04-02 23:31
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=413333&group_id=5470
Category: Core (C code)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Brian Quinlan (bquinlan)
Assigned to: M.-A. Lemburg (lemburg)
Summary: Improved support for unicode conversions
Initial Comment:
This patch is designed to increase the flexibility of
the unicode conversion function. The proposed strategy
is:
def unicode( val )
if type( val ) == type.UnicodeType:
return val
else:
return str_to_unicode( str( val ) )
This makes it possible to perform operations such as:
unicode( 5 ) => u'5'
without generating an exception.
----------------------------------------------------------------------
>Comment By: M.-A. Lemburg (lemburg)
Date: 2001-09-20 03:51
Message:
Logged In: YES
user_id=38388
I like the idea since it synchronizes str() and unicode() in terms of semantics. The patch is too radical though: the
str() approach should only be used if everything else fails.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2001-07-18 23:48
Message:
Logged In: YES
user_id=21627
I recommend to close this patch, as suggested by the
submitter.
----------------------------------------------------------------------
Comment By: Brian Quinlan (bquinlan)
Date: 2001-04-22 11:45
Message:
Logged In: YES
user_id=108973
I would propose ignoring this patch, leaving the existing
function as is, and adding an additional function to
unicodeobject.c that does this.
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2001-04-10 14:35
Message:
Logged In: YES
user_id=6380
Too late for 2.1 -- no functionality changes allowed.
Assigned to Marc-Andre, who's in charge of Unicode.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=413333&group_id=5470