This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author py.user
Recipients ezio.melotti, loewis, mrabarnett, py.user
Date 2012-03-10.00:19:06
SpamBayes Score 1.827228e-05
Marked as misclassified No
Message-id <1331338747.57.0.0600173685423.issue14237@psf.upfronthosting.co.za>
In-reply-to
Content
Martin v. Löwis wrote:
> What behavior would you expect?

I expected similar work

>>> re.search(r'[\s]a', ' a').group()
' a'
>>> re.search(r'[\s]a', 'ba').group()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'group'
>>> 
>>> 
>>> re.search(r'[^\s]a', ' a').group()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'group'
>>> re.search(r'[^\s]a', 'ba').group()
'ba'
>>>
History
Date User Action Args
2012-03-10 00:19:07py.usersetrecipients: + py.user, loewis, ezio.melotti, mrabarnett
2012-03-10 00:19:07py.usersetmessageid: <1331338747.57.0.0600173685423.issue14237@psf.upfronthosting.co.za>
2012-03-10 00:19:07py.userlinkissue14237 messages
2012-03-10 00:19:06py.usercreate