[Python-3000] Regular expressions, py3k and unicode
Nick Coghlan
ncoghlan at gmail.com
Sun Jun 29 06:39:57 CEST 2008
Terry Reedy wrote:
>
>
> Guido van Rossum wrote:
>> On Sat, Jun 28, 2008 at 1:45 PM, Antoine Pitrou <solipsis at pitrou.net>
>> wrote:
>>> Wouldn't it be more natural that, at least when the pattern is a str
>>> object
>>> rather a bytes object, the re.UNICODE be implied by default?
>>
>> +1
>
> Would there be any reason (I do not know) to replace that with an
> re.ASCII flag to have the reverse effect (assuming there is not now)?
I'd be inclined to have it implied by the type of the argument - a str
argument implies re.UNICODE is set, a bytes or bytearray argument
implies it isn't. Users could still set it explicitly to have it apply
in the latter case.
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
---------------------------------------------------------------
http://www.boredomandlaziness.org
More information about the Python-3000
mailing list