Python’s Hidden Regular Expression Gems | Armin Ronacher’s Thoughts and Writings

Python’s Hidden Regular Expression Gems

There are many terrible modules in the Python standard library, but the Python re module is not one of them. While it’s old and has not been updated in many years, it’s one of the best of all dynamic languages I would argue.

What I always found interesting about that module is that Python is one of the few dynamic languages which does not have language integrated regular expression support. However while it lacks syntax and interpreter support for it, it makes up for it with one of the better designed core systems from a pure API point of view. At the same time it’s very bizarre. For instance the parser is written in pure Python which has some bizarre consequences if you ever try to trace Python while importing. You will discover that 90% of your time is probably spent in on of re’s support module.

Source: Python’s Hidden Regular Expression Gems | Armin Ronacher’s Thoughts and Writings

 

Raony Guimaraes