[Patches] [ python-Patches-636005 ] Filter unicode into unicode
SourceForge.net
noreply@sourceforge.net
Fri, 24 Jan 2003 17:30:40 -0800
Patches item #636005, was opened at 2002-11-09 15:15
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=636005&group_id=5470
Category: Core (C code)
Group: Python 2.3
Status: Open
Resolution: Accepted
Priority: 5
Submitted By: Martin v. Löwis (loewis)
>Assigned to: Martin v. Löwis (loewis)
Summary: Filter unicode into unicode
Initial Comment:
Currently, filter(None, "abc") gives "abc", but
filter(None, u"abc") gives [u'a', u'b', u'c']. This
patches corrects this, adding a Unicode specical case
for filter.
----------------------------------------------------------------------
Comment By: Raymond Hettinger (rhettinger)
Date: 2003-01-23 17:49
Message:
Logged In: YES
user_id=80475
Looks good, compiles fine, passes regrtests, doesn't
appear to have any leaks, and looks like a faithful
interpretation of filterstring() just above it.
Consider expanding the tests to verify the
return type. Since 'abc' == u'abc', the
current tests would pass even if the return
type were a non-unicode string.
Please apply.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2003-01-21 16:38
Message:
Logged In: YES
user_id=21627
Argh! I lost it, so I had to recreate. It is attached now.
----------------------------------------------------------------------
Comment By: Raymond Hettinger (rhettinger)
Date: 2003-01-18 22:04
Message:
Logged In: YES
user_id=80475
Do you still have this patch available?
----------------------------------------------------------------------
Comment By: M.-A. Lemburg (lemburg)
Date: 2002-11-11 04:11
Message:
Logged In: YES
user_id=38388
There's no patch attached to this SF item, but
you're right, filter() should behave in the same
way for 8-bit strings as for Unicode.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=636005&group_id=5470