Re: [Python-Dev] Revising RE docs

2005-09-05 Thread Fredrik Lundh
Guido van Rossum wrote: I also notice that _compile() is needlessly written as a varargs function -- all its uses pass it exactly two arguments. that's because the function uses [1] the argument tuple as the cache key, and I wanted to make the cache hit path as fast as possible. (but that was

Re: [Python-Dev] Revising RE docs

2005-09-05 Thread Gareth McCaughan
Guido wrote: They *are* cached and there is no cost to using the functions instead of the methods unless you have so many regexps in your program that the cache is cleared (the limit is 100). Sure there is; the cost of looking them up in the cache. ... So in this (highly

Re: [Python-Dev] Revising RE docs

2005-09-05 Thread Fredrik Lundh
Am I the only who are getting mails from iextream at naver.com whenever I post to python-dev, btw? My Korean (?) isn't that good, so I'm not sure what they want... /F ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Revising RE docs

2005-09-05 Thread Tim Peters
[Fredrik Lundh] Am I the only who are getting mails from iextream at naver.com whenever I post to python-dev, btw? My Korean (?) isn't that good, so I'm not sure what they want... Only thing I've seen from them is one post in the archives, on June 13:

Re: [Python-Dev] Revising RE docs

2005-09-03 Thread Guido van Rossum
On 9/2/05, Gareth McCaughan [EMAIL PROTECTED] wrote: On Thursday 2005-09-01 18:09, Guido van Rossum wrote: They *are* cached and there is no cost to using the functions instead of the methods unless you have so many regexps in your program that the cache is cleared (the limit is 100).

Re: [Python-Dev] Revising RE docs

2005-09-02 Thread Gareth McCaughan
On Thursday 2005-09-01 18:09, Guido van Rossum wrote: They *are* cached and there is no cost to using the functions instead of the methods unless you have so many regexps in your program that the cache is cleared (the limit is 100). Sure there is; the cost of looking them up in the cache.

Re: [Python-Dev] Revising RE docs

2005-09-01 Thread Guido van Rossum
On 8/31/05, Stephen J. Turnbull [EMAIL PROTECTED] wrote: Michael == Michael Chermside [EMAIL PROTECTED] writes: Michael (2) is what we have today, but I would prefer (1) to Michael gently encourage people to use the precompiled objects Michael (which are distinctly faster when

Re: [Python-Dev] Revising RE docs

2005-08-31 Thread Greg Ewing
Stephen J. Turnbull wrote: But you could have string objects (or a derivative) grow a compiled_regexp attribute internally. That would make the core dependent on the re module, which I think would be a bad idea. Personally I like the way the compilation step is made at least somewhat explicit.

Re: [Python-Dev] Revising RE docs

2005-08-31 Thread Stephen J. Turnbull
Greg == Greg Ewing [EMAIL PROTECTED] writes: Greg Stephen J. Turnbull wrote: But you could have string objects (or a derivative) grow a compiled_regexp attribute internally. Greg That would make the core dependent on the re module, which I Greg think would be a bad idea.

Re: [Python-Dev] Revising RE docs (was: partition() (was: Remove str.find in 3.0?))

2005-08-30 Thread Fred L. Drake, Jr.
On Tuesday 30 August 2005 17:35, Michael Chermside wrote: An excellent point. Obviously, EITHER (1) the module functions ought to be documented by reference to the RE object methods, or vice versa: (2) document the RE object methods by reference to the module functions. Agreed. I think the

Re: [Python-Dev] Revising RE docs (was: partition() (was: Removestr.find in 3.0?))

2005-08-30 Thread Terry Reedy
Fred L. Drake, Jr. [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'd rather see it reversed from what it is as well. While I don't have the time myself (and don't consider it a critical issue), I certainly won't revert a patch to make the change without good reason. :-) Do