[Python-ideas] Exposing regular expression bytecode

Andrew Barnert abarnert at yahoo.com
Tue Feb 16 02:28:45 EST 2016


On Feb 15, 2016, at 22:36, Jonathan Goble <jcgoble3 at gmail.com> wrote:
> 
>> On Tue, Feb 16, 2016 at 1:15 AM, Andrew Barnert <abarnert at yahoo.com> wrote:
>> Isn't the regex module intended to replace the re module "one of these days", once it's actually whipped into stdlibable shape? If so, it seems like it would be better to help Matthew finish that than to add to the re module.
> 
> As I said roughly 24 hours ago, I'd like to see this in core now
> (meaning 3.6) because of its usefulness and (I presume) its
> simplicity. The regex module has been "intended" to replace re for
> what seems like (and probably has been) years, and could take several
> more years at this pace.

Sorry; I was assuming it was close because it almost made it into 3.3 and then again 3.4. But I guess the alternative position--that almost but not quite making 3.3 and 3.4 and then not even being mentioned for 3.5--implies that it may not be that near-future, even if you were to help with it.

Anyway, assuming it's not that complicated, and you did the work, the only negative is that it might encourage people to write code that depends on re that regex can't be backward-compatible with. And at this point, that doesn't seem like much of a negative. (At the very least, nobody's made a good argument for it being a major negative.)

> As such, you're
> not leaving a good first impression on newbie me 

On a personal note: please keep in mind that I'm just some random guy, like you, and so are many other people on this list. Please don't hold anything I say against the core devs, any more than you'd want something you say to represent them. It can be frustrating to push ideas through -ideas--but if you think of the long-term consequences of keeping Python simple and conservative vs. keeping the discussion fair to new ideas, it helps with the frustration. I hope I haven't contributed to pushing you away from contributing to Python, because it needs people willing to do the work and put together complete ideas, with complete implementations.


More information about the Python-ideas mailing list