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-March/002984.html below:

what to do with undocumented attributes?

[Python-Dev] SRE: what to do with undocumented attributes? [Python-Dev] SRE: what to do with undocumented attributes?Guido van Rossum guido@python.org
Thu, 30 Mar 2000 18:31:43 -0500
> at this time, SRE uses types instead of classes for compiled
> patterns and matches.  these classes provide a documented
> interface, and a bunch of internal attributes, for example:
> 
> RegexObjects:
> 
>     code -- a PCRE code object
>     pattern -- the source pattern
>     groupindex -- maps group names to group indices
> 
> MatchObjects:
> 
>     regs -- same as match.span()?
>     groupindex -- as above
>     re -- the pattern object used for this match
>     string -- the target string used for this match
> 
> the problem is that some other modules use these attributes
> directly.  for example, xmllib.py uses the pattern attribute, and
> other code I've seen uses regs to speed things up.
> 
> in SRE, I would like to get rid of all these (except possibly for
> the match.string attribute).
> 
> opinions?

Sounds reasonable.  All std lib modules that violate this will need to
be fixed once sre.py replaces re.py.

(Checkin of sre is next.)

--Guido van Rossum (home page: http://www.python.org/~guido/)



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