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 Kunjesh.Kaushik
Recipients Kunjesh.Kaushik, fdrake, lukasz.langa, r.david.murray, rhettinger
Date 2011-01-28.07:59:46
SpamBayes Score 8.160139e-13
Marked as misclassified No
Message-id <1296201587.11.0.767010771462.issue11027@psf.upfronthosting.co.za>
In-reply-to
Content
I think we are dealing with two separate issues: a feature request for sectionxform kind of functionality desirable in a future release (3.3 maybe) and a behaviour issue in current releases (2.x and 3.x both). I suggest we split the two issues and solve them as such. Deferring the latter may be undesirable.

Also, I found that a non-greedy pattern will work with the original patch:

>>> import re
>>> r = re.compile(r'\[\s*(?P<header>[^]]+?)\s*\]') # note +? instead of +
>>> r.match('[ section header ]').group('header')   # works as "expected"
'section header'

Attaching a new patch file as well.
History
Date User Action Args
2011-01-28 07:59:47Kunjesh.Kaushiksetrecipients: + Kunjesh.Kaushik, fdrake, rhettinger, r.david.murray, lukasz.langa
2011-01-28 07:59:47Kunjesh.Kaushiksetmessageid: <1296201587.11.0.767010771462.issue11027@psf.upfronthosting.co.za>
2011-01-28 07:59:46Kunjesh.Kaushiklinkissue11027 messages
2011-01-28 07:59:46Kunjesh.Kaushikcreate