When to compile regex?
David Shochat
shochat at chelmsford.com
Sun Feb 13 07:02:42 EST 2000
More information about the Python-list mailing list
Sun Feb 13 07:02:42 EST 2000
- Previous message (by thread): When to compile regex?
- Next message (by thread): When to compile regex?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
In section 4.2.3 of the Python Library Reference (1.5.2) it says that using compile is more efficient "when the expresion will be used several times in a single program". I'm trying to figure out the intended meaning of this. Does that mean "executed more than once", or "occurs more than once in the program text"? Specifically, if it only occurs once, but that is in a loop, is there an advantage to compiling before entering the loop? -- David
- Previous message (by thread): When to compile regex?
- Next message (by thread): When to compile regex?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list