[ python-Bugs-926075 ] re.sub on u'' gives NON-unicode ''

SourceForge.net noreply at sourceforge.net
Thu Apr 1 00:47:57 EST 2004


Bugs item #926075, was opened at 2004-03-31 00:27
Message generated for change (Comment added) made by perky
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=926075&group_id=5470

Category: Regular Expressions
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Alex Martelli (aleax)
Assigned to: Fredrik Lundh (effbot)
Summary: re.sub on u'' gives NON-unicode ''

Initial Comment:
>>> import re 
>>> re.sub(u'.', u'', u'') 
'' 
 
This holds for any RE that doesn't match the empty string. 
 

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

>Comment By: Hye-Shik Chang (perky)
Date: 2004-04-01 14:47

Message:
Logged In: YES 
user_id=55188

Here's a fix.

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

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



More information about the Python-bugs-list mailing list