[Python-ideas] Exposing regular expression bytecode

Jonathan Goble jcgoble3 at gmail.com
Mon Feb 15 02:47:28 EST 2016


On Mon, Feb 15, 2016 at 2:26 AM, Wes Turner <wes.turner at gmail.com> wrote:
> the new 'regex' module (with a re compatability mode and unicode) may be the
> place to find/add more debugging syms

Thanks, but I'm already well aware of that module, as I'm already
using it for another project of mine that requires some of its new
features. But this proposal, I think, is simple enough that it would
be worth doing for the built-in 're' modules. Also, the things that
implementing it would enable, such as optimizers and especially
debuggers, would be available to a much larger number of people if the
built-in module supported them.

I'm not really asking for much; just take an array already in the
struct that represents the object, expose it as a public attribute,
and write a simple 'dis'-like module to enable low-level programmatic
analysis. Once that's available, third parties are likely to build on
it from there; that's much less likely to happen if such tools only
worked on a different regex module (albeit a great one) from PyPI and
not on the built-in version.


More information about the Python-ideas mailing list