[Python-Dev] should sre.Scanner be exposed through re and documented? (original) (raw)

"Martin v. L�wis" martin@v.loewis.de
Fri, 25 Apr 2003 21:32:26 +0200


Skip Montanaro wrote:

While moving tests from testsre to testre I stumbled upon a simple test for sre.Scanner. This looks fairly cool. Should it be exposed through re and documented?

I think /F did not consider it ready for general consumption. I believe the approach is cool, but the API would still leave features to be desired. In practical compiler construction, I usually copy the approach, and duplicate it - that gives a very efficient and readily comprehensible scanner.

IOW, I would leave it where it is: As a masterpiece of work to get inspiration from, but not as a tool to give out to anybody.

Regards, Martin