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 tim.peters
Recipients BreamoreBoy, ezio.melotti, mrabarnett, py.user, serhiy.storchaka, tim.peters
Date 2014-06-26.20:52:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1403815945.55.0.407543312954.issue14460@psf.upfronthosting.co.za>
In-reply-to
Content
>> (?<=a)(?<=a)(?<=a)(?<=a)

> There are four different points.
> If a1 before a2 and a2 before a3 and a3 before a4 and a4
> before something.

Sorry, that view doesn't make any sense.  A successful lookbehind assertion matches the empty string.  Same as the regexp

()()()()

matches 4 empty strings (and all the _same_ empty string) at any point.

> Otherwise repetition of assertion has no sense.

As I said before, it's "usually a silly thing to do".  It does make sense, just not _useful_ sense - it's "silly" ;-)

> If it has no sense, there should be an exception.

Why?  Code like

    i += 0

is usually pointless too, but it's not up to a programming language to force you to code only useful things.

It's easy to write to write regexps that are pointless.  For example, the regexp

(?=a)b

can never succeed.  Should that raise an exception?  Or should the regexp

(?=a)a

raise an exception because the (?=a) part is redundant?  Etc.
History
Date User Action Args
2014-06-26 20:52:25tim.peterssetrecipients: + tim.peters, ezio.melotti, mrabarnett, py.user, BreamoreBoy, serhiy.storchaka
2014-06-26 20:52:25tim.peterssetmessageid: <1403815945.55.0.407543312954.issue14460@psf.upfronthosting.co.za>
2014-06-26 20:52:25tim.peterslinkissue14460 messages
2014-06-26 20:52:25tim.peterscreate