speeding up string.split()
thomas at xs4all.net
Sun May 27 19:05:29 EDT 2001
On Sun, May 27, 2001 at 10:33:03PM +0000, jcm wrote:
> Remco Gerlich <scarblac at pino.selwerd.nl> wrote:
> It'd be Nice if the Python parser (or bytecode-compiler or whatever
> non-runtime thing is most appropriate) would translate the addition of
> two string literals into a single string. Or maybe it does this
> already? I haven't tried.
No, it doesn't, in the same way that a negative integer literal doesn't
exist. That's one of the reason there is 'string literal concatenation':
adjacent string literals (that is, "foo" "bar" with only whitespace between
them) are concatenated at compile time.
Thomas Wouters <thomas at xs4all.net>
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
More information about the Python-list