A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-September/009134.html below:

[Python-Dev] Bug #113254: pre/sre difference breaks pyclbr

[Python-Dev] Bug #113254: pre/sre difference breaks pyclbr [Python-Dev] Bug #113254: pre/sre difference breaks pyclbrFredrik Lundh Fredrik Lundh" <effbot@telia.com
Sat, 2 Sep 2000 18:05:33 +0200
paul prescod spotted this discrepancy:

from the documentation:

    start ([group]) 
    end ([group]) 
        Return the indices of the start and end of the
        substring matched by group; group defaults to
        zero (meaning the whole matched substring). Return
        None if group exists but did not contribute to the
        match.

however, it turns out that PCRE doesn't do what it's
supposed to:

>>> import pre
>>> m = pre.match("(a)|(b)", "b")
>>> m.start(1)
-1

unlike SRE:

>>> import sre
>>> m = sre.match("(a)|(b)", "b")
>>> m.start(1)
>>> print m.start(1)
None

this difference breaks 1.6's pyclbr (1.5.2's pyclbr works
just fine with SRE, though...)

:::

should I fix SRE and ask Fred to fix the docs, or should
someone fix pyclbr and maybe even PCRE?

</F>




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4