schizophrenic view of what is white space

Terry Reedy tjreedy at udel.edu
Thu Dec 4 19:43:02 CET 2008


> so the default behaviour differs for unicode and re working on unicode. 
> I suppose that won't be true in Python 3.

import re
print(re.compile(r'\s').search('a b'))
print(re.compile(r'\s').search('a\xa0b') )

 >>> ================================ RESTART ===============
 >>>
<_sre.SRE_Match object at 0x00ADAA68>
<_sre.SRE_Match object at 0x00ADAA68>




More information about the Python-list mailing list